You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Rephoto's avatar
Rephoto
Helpful | Level 5
2 years ago

concurrent upload in chunks

Hi, I have done concurrent upload in chunks. My code is fine, and doesn't have any errors. But when I download them, I can't open them
My code :

My file has been uploaded to dropbox:

And I can't open it when I download it:

 

 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Can you clarify what you mean when you say "code is fine, and doesn't have any errors"? How have you verified that the code is uploading the correct data?

     

    For instance, I don't see in this code where you're using "memStream", so it doesn't look like you're sending the actual file data.

     

    Refer to the UploadSessionAppendV2Async documentation for information on the parameters it takes and how to use it.

     

    Note that Dropbox will only save the exact bytes you send, so as verification I suggest comparing comparing the original file with the file uploaded on Dropbox to see if they differ. For example, you can take a hash of both files and see if the hashes match.

    • Rephoto's avatar
      Rephoto
      Helpful | Level 5

      Oh, Sorry I didn't see your reply.
      Can I use UploadSessionAppendV2Async to run in parallel like this?

       

    • Rephoto's avatar
      Rephoto
      Helpful | Level 5

      I tried it and my file was corrupted. Can I just do UploadSessionAppendV2Async sequentially?

       

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        Yes, the UploadSessionAppendV2Async method supports both "concurrent" and "sequential" upload session types. Which one you use is up to you, but in either case you'll need to make sure you're sending the correct data at the correct offsets.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,884 PostsLatest Activity: 48 minutes ago
326 Following

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!