Discuss Dropbox Developer & API
Hi,
I encountered the problem "Error while copying content to a stream" when executing the above code. Is there any way to fix it?
I have a large number of photos (including about 100 photos under 10Mb). If I use UploadAsync it is getting a lot of too_many_write_operations/ errors.
And that's why I need a new solution to push these photos to Dropbox in a short time. To perform the next tasks
Create and upload sessions (and close it) for all files that are less than 150MB in parallel and finally finish all them in a single call. 'too_many_write_operations' is sensitive to number of finishes. When you have many finishes it becomes likely to appears such a error. When you combine them in single call they become less likely.
So the best way for me to do this task is:
Use UploadSessionStartBatchArg to create sessions, followed by using UploadSessionAppendV2Async to upload each file. And finally, use UploadSessionFinishBatchAsync to complete the task, right?
Thanks
Hm... Ok right.
Thank you very much. I'm trying again
@Здравко
I have tried this before. But they all got this error ![]()
You should debug yourself connection breaks, but there are other... let say strange things in your code. You're starting upload file content at expected file end instead of the beginning. Why? By the way this is error since the file content cannot have "gaps". Even without connection break, you would receive error denoting inconsistent files.
Can you point out where my error is? I don't know what to do yet. Thanks
Do you understand that on that place has to be the offset in the file in Dropbox session where ongoing upload would go to? In this context, what would be between offset 0 up to memStream.Length?
According your code, there is nothing. ![]()
Read the documentation with a bit more care!
Yes
,
I have done uploading small sized files. And I continue to upload files larger than 150MB in size. But when I use "var result = await _client.Files.UploadSessionStartAsync(body: memStream, sessionType: UploadSessionType.Concurrent.Instance);" I encountered this error ""Error while copying content to a stream.""
Hi there!
If you need more help you can view your support options (expected response time for a 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!