cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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

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

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

Greg-DB
Dropboxer
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

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

Greg-DB
Dropboxer
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

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

m4man
Explorer | Level 3

Thank you.

Who's talking

Top contributors to this post

  • User avatar
    m4man Explorer | Level 3
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?