DEV Community

Discussion on: How To Upload Multiple files to Cloudinary in Nodejs using Promise.all

Collapse
 
khauri profile image
Khauri • Edited

Nice tutorial. Very succinct.

I had to solve a similar problem like this, except with uploading images to AWS S3. I discovered pretty quickly that uploading assets to our server and then sending them elsewhere had a tendency to run the server out of memory/disk space and cause the app to crash or eat up the event loop and cause a lot of latency. In the end we settled on doing client-side uploads straight to S3 by using a signed URL. I believe Cloudinary has something similar. I believe they have an api here for allowing multiple images as well.
Would love to see your take on this.

Collapse
 
boyepanthera profile image
Olanrewaju A. Olaboye

Thanks, @khauri you are very right. But there are few ways to handle that load issue. One is to make the response event-based using socket rather than HTTP req/res circle. And I agree with you there are times when you just give the frontend the keys and a chance to use the React/Vue SDK and they only send a reference to the upload secure_url and public key to the server which I believe was your go-to way.