You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When "BOOST_CGI_KEEP_FILE_UPLOADS" is not defined and "BOOST_CGI_NO_BOOST_FILESYSTEM" is not defined, the form_part destructor deletes the file. This sounds good, except for when the form_part is a local variable in the form_parser::parse_form_part method and the file gets deleted when the local variable goes out of scope. So, what ends up happening is that the form_parser::parse_form_part method parses the part, creates the file, then deletes it upon return.
I ended up defining "BOOST_CGI_KEEP_FILE_UPLOADS" and handled cleaning up the uploaded files at the application level.
The text was updated successfully, but these errors were encountered:
shattar
changed the title
CGI POST multipart/form-data deletes uploaded files before application can get it
CGI POST multipart/form-data deletes uploaded files before application can access them
Feb 1, 2019
When "BOOST_CGI_KEEP_FILE_UPLOADS" is not defined and "BOOST_CGI_NO_BOOST_FILESYSTEM" is not defined, the
form_part
destructor deletes the file. This sounds good, except for when theform_part
is a local variable in theform_parser::parse_form_part
method and the file gets deleted when the local variable goes out of scope. So, what ends up happening is that theform_parser::parse_form_part
method parses the part, creates the file, then deletes it upon return.I ended up defining "BOOST_CGI_KEEP_FILE_UPLOADS" and handled cleaning up the uploaded files at the application level.
The text was updated successfully, but these errors were encountered: