Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have the following function that upload files to Dropbox:
private async Task<string> Upload(DropboxClient dbx, string localPath, string remotePath) { const int ChunkSize = 4096 * 1024; using (var fileStream = File.Open(localPath, FileMode.Open)) { if (fileStream.Length <= ChunkSize) { await dbx.Files.UploadAsync(remotePath, body: fileStream); //set the expiry date var settings = new SharedLinkSettings(expires: DateTime.Today.AddDays(7)); SharedLinkMetadata sharedLinkMetadata = await dbx.Sharing.CreateSharedLinkWithSettingsAsync(remotePath, settings); return sharedLinkMetadata.Url; } else { await this.ChunkUpload(dbx, remotePath, fileStream, ChunkSize); } return "error"; } }
That works fine, but I need to upload many documents in one time and it takes long to loop through the documents and to upload them one by one, is there any option to upload a few documents at the same time?
Thanks in advance.
Thank you.
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
Sound good? Let's get started.Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!