cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to upload more than one document a time? (API)

Is it possible to upload more than one document a time? (API)

m4man
Explorer | Level 3
Go to solution

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.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
Unfortunately, no, the Dropbox API doesn't offer a bulk upload method, but I'll be sure to pass this along as a feature request.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution
Unfortunately, no, the Dropbox API doesn't offer a bulk upload method, but I'll be sure to pass this along as a feature request.

m4man
Explorer | Level 3
Go to solution

Thank you.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    m4man Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?