DEV Community

Discussion on: How to Upload Multiple File with Progress Bar (ReactJS + Redux and ExpressJS)

Collapse
 
noamatish profile image
Noamatish

?

Collapse
 
devinekadeni profile image
Devin Ekadeni • Edited

My personal opinion it's just like you said, probably it will kill the page, so my suggestion is to add maximum files limitation for on going upload file (for example 10 max), then from the UI you should disable the dropdown area and give some message to the user.
It's a rare case to have people upload 250+ files at the same time, but this is my opinion.

Thread Thread
 
noamatish profile image
Noamatish

But what if i do need this?
There maybe situations that some one will upload 1000+ pictures.
What would you recommend in these situations? (photos can be also very heavy)

Thread Thread
 
devinekadeni profile image
Devin Ekadeni

No, my answer is still the same, IMO it will kill the page because of memory leaks, so i really wouldn't recommend doing that.
And can you elaborate more (perhaps with example) how do users able to upload 1000+ pictures at a time? Because I never find that case in any apps (at least for me).
But if you insist, honestly I don't have any valid answer for this one. Probably you should change the data structure or you can upload it by queuing every 5 files or....yeah sorry, I don't have any valid answer for this one.

Thread Thread
 
udayraj123 profile image
Udayraj Deshmukh

@noamatish you can checkout the p-limit package, it can serve the purpose of limiting number of uploads at a time while queueing the rest.
github.com/sindresorhus/p-limit