I implemented something like it in the following way:
Setup a S3 bucket to hold pictures
Endpoint to retrieve temporary tokens for the upload
JS client that retrieves such token and then uploads directly to S3
Endpoint to associate the resource with the URL
Basically instead of uploading to the backend you upload directly to the remote storage, retrieve the URL and use it. This way you avoid impacting your own servers for the upload.
Bonus points: you can use resizing services like Cloudinary that also act as CDNs.
I implemented something like it in the following way:
Basically instead of uploading to the backend you upload directly to the remote storage, retrieve the URL and use it. This way you avoid impacting your own servers for the upload.
Bonus points: you can use resizing services like Cloudinary that also act as CDNs.
Ey, How could I invite you a beer? :)
Thanks a lot for your orientation, I'm gonna check S3 bucket for these purpose.
Man, it really helps. Thanks so much.
No worries!
Heroku has a tutorial with S3 + Node.js, I'm sure other cloud storage systems have something similar: Direct to S3 File Uploads in Node.js