We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
Dominoid
8 years agoNew member | Level 2
Best Way To Upload Thousands of Files .NET API
I have an application that retrieves thousands (across all clients) of PDFs daily from a Point of Sale (POS) computer system. I then upload those files to the users Dropbox account for paperwork retention laws, but as my business expands this process takes several hours daily now and I'm looking to speed it up before it becomes a problem.
Currently I simply iterate through each file and use UploadAsync for each one. The files are small averaging less 50k each, but the UploadAsync can take 2-3 seconds each (sometimes faster). Doing the math, the upload process can take 3-4 hours.
So. . . what is the fastest way to do this? Do I simply need to create parallel processes and upload say 10 at a time in parallel, or is there another way. I've seen an UploadSessionStart call that is referenced on the Data Ingress Guide here — https://www.dropbox.com/developers/reference/data-ingress-guide. But I can't find any sample code for such things officially or by any user and can't figure it out myself.
TIA — Shawn
1 Reply
- Greg-DB8 years ago
Dropbox Community Moderator
Using upload sessions and batch committing as outlined in the data ingress guide you linked to is the best way to do this.
We don't have a sample of using that in .NET SDK, but there is a basic example of using upload sessions (without the batch commit) here:
https://github.com/dropbox/dropbox-sdk-dotnet/issues/28
That should be a good starting point for implementing this and then adding the batch commit.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 8 hours ago
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 or Facebook.
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!