Need to see if your shared folder is taking up space on your dropbox šØāš»? Find out how to check here.
Forum Discussion
zainulabd786
7 years agoExplorer | Level 3
How to upload multiple files using JavaScript SDK?
Hi, I am using Javascript SDK to upload multiple files at once. I have a dropbox business account enabled and the folder where I am trying to upload the files is a shared folder.
I want to upload t...
- 7 years ago
I see, thanks for clarifying. The Dropbox API doesn't offer a way to upload multiple files in one call, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
That being the case, you will need to loop through your files and call filesUpload once per file. Apologies I don't have better news for you!
TaylorKrusen
Dropbox Staff
7 years agoThe 429 error that you are getting is due to lock contention. Basically, Promise.all() triggers all requests at the same time and waits for them to resolve before continuing. In this case, all the simultaneous requests are causing lock contention.
There are two possible solutions:
1. Execute your requests serially. This may make your script take a little longer, but is probably easier to implement since you've already made so much progress.
2. Make use of "upload sessions" which is a different endpoint. Take a look at the data ingress guide for a good explanation. As an added bonus, that guide includes a more detailed explanation of lock contention.
zainulabd786
7 years agoExplorer | Level 3
Okay! regarding your second point, According to documentation, "upload sessions" are meant for the files > 150MB, But in my case, The number of files is large but the size of each file is < 150MB.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!