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
2 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; ...
- 2 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.
Greg-DB
Dropbox Staff
What line is that occurring on? Please print the full exception and stack trace for reference.
Rephoto
2 years agoHelpful | Level 5
This is another error you may encounter
- Greg-DB2 years agoDropbox Staff
Thanks 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
795 PostsLatest Activity: 2 days agoIf 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!