Hi,
We are using mongrel_upload_progress to upload pictures. All fine and
good.
But after the file is uploaded by the user we are currently using
FileUtils.copy_stream to copy the uploaded file data into our WebDav.
I think this process is probably inefficient and results in
unnecessary allocation/deallocation of memory as ruby has to first
read and then write the file data.
I think a better alternative will be using FileUtils.copy, and copy
the temp file on to the WebDav. But it seems if the upload is less
than 12 KB mongrel doesn’t creates a TempFile object.
Is there any way to force mongrel to always create temp files?
Or should we check if the temp file is there or not and based on that
use copy_stream or copy?
What is your experience with handling above scenario? Any tips?
Thanks a lot!