Project

General

Profile

Large File Uploads Saved to File System Twice

Added by Aaron Wright about 1 year ago

When I upload a file larger than configuration().maxMemoryRequestSize() it is spooled to the file system (/tmp/wtXXXXXX) twice. Once as a request (multi-part/form-data), and then again as the file from the request (binary). The file is large enough that I would like to avoid the second copy. It takes up a lot of space, and it makes the upload take twice as long.

My disk is slow, and I have limited RAM, so I cannot afford the second copy. Thoughts on how to avoid the second copy of the file?