Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Rephoto
3 years agoHelpful | Level 5
Error while copying content to a stream in C#
Hi, I encountered the problem "Error while copying content to a stream" when executing the above code. Is there any way to fix it? try { var chunkSize = 16 * 1024 * 1024; ...
- 3 years ago
Rephoto If you wish to optimize your upload process, please refer to the Performance Guide: https://developers.dropbox.com/dbx-performance-guide
That offers some ways you may be able to improve your effective overall upload speed. For example, there are batching and parallelization features you can use.
For instance, as Здравко noted, the default upload session type is "sequential", but you can use "concurrent" to upload file pieces in parallel. That would require you to make some more changes to your code to properly send those pieces in parallel though.
Rephoto
3 years agoHelpful | Level 5
This is another error you may encounter
Greg-DB
Dropbox Community Moderator
3 years agoThanks for sharing the additional information. It looks like this is related to you trying to start multiple tasks within the loop without awaiting them, leading to the stream being closed (due to the iteration continuing and moving on to the next piece of the file) before it can be used.
Exactly how you structure your code/tasks is up to you, but to get this working I suggest awaiting each append task, instead of using tasks.Add and Task.WhenAll.
About Discuss Dropbox Developer & API
Make connections with other developers
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, Facebook or Instagram.
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!