Here's a great article by Michael Dyrynda on the topic. https://dyrynda.com.au/blog/uploading-files-to-amazon-s3-from-the-browser-part-one
Jun 26, 2019
2
Level 14
File Uploads to Remote Service - Defer?
Hello everyone!
I am working on an application that stores uploaded images on Cloudinary. (For the sake of this question basically just remote file storage)
When the user submits the form, I check if the request has any attachments, validate the files, etc. I then loop over the submitted files and upload them to the service.
My question is, is there a better way to do this?
By the time I am looping over the files, the files have been uploaded to the server... would it make sense to persist them to the local storage disk and dispatch jobs to upload them to the service? And then clean up the files after they have been uploaded?
Any tips would be greatly appreciated!
Cheers - Wyatt
Please or to participate in this conversation.