from what i understand in File Uploads – Phoenix v1.3.0-rc.0. File uploads are saved as a temporary file and cleaned out after request is completed. Is there anyway i can do this in a streaming fashion such that no temporary file is involved? I receive user file uploads in a stream and start working on the stream even before upload is completed.
Why i am thinking of doing this?
- What if user uploads a huge file? The temporary file is gonna take up space.
- It’s more performant because work already starts before file upload is complete.
- If somehow file upload fails before it’s completed. I am happy to throw away work done thus far
- Memory consumption is low as its effectively size of stream buffer and not size of file uploaded