Open paulofrodriguez opened 1 year ago
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.
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 `
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
Press control+c to break the upload before it is finished
go to the temp directory and list the files and check there is a trash segment with random name
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