-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kemal won't clean up broken file uploads #661
Labels
Comments
This could be a nice improvement. However currently I have no idea about how to achieve this behavior.... @straight-shoota anything on your side? |
I suppose temp files from file uploads should be deleted when the respective request has been processed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
During a upload to a kemal endpoint if the upload is interrupted for any reason, kemal keeps the temporary file saved on the disk and eliminates all the metadata information in a way that is impossible to know what file should be manually cleaned.
Steps to Reproduce
`
post "/alt" do |env|
begin
end
end
#add_handler PostOnlyHandler.new
Kemal.run
4. intiate a curl to upload a long file (using 8gb on this case):
curl -X POST -F "image1=@file8" http://localhost:8000/alt -o test`
5. Press control c to break the upload before it is finished
Expected behavior: temp file should have been deleted or a filename should remains in some variable to allow manual cleaning
Actual behavior: no file name available and file is still there
Reproduces how often: 100% of times
Versions
Crystal 1.9.2 [1908c816f] (2023-07-19)
LLVM: 15.0.7
Default target: x86_64-unknown-linux-gnu
kemal: 1.4.0
Additional Information
The text was updated successfully, but these errors were encountered: