Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello,
We use Official Dropbox .Net v2 SDK.
Average uploading speed for some our clients is 50-100 kb/sec.
We use the following code to upload chunks
log.Trace("{0}. File chunk taken. CountBytes: \"{1}\"", nameof(UploadFileImpl), countBytes); using (var memStream = new MemoryStream(buffer.Take(countBytes).ToArray())) { using (var t = dropBoxClient.Files.UploadSessionAppendV2Async(new UploadSessionCursor(sessionId, offset), false,memStream)) { t.Wait(); } } offset += (ulong) countBytes; log.Trace("{0}. File chunk uploaded. Offset: \"{1}\"", nameof(UploadFileImpl), offset);
In client's log we can see the following record:
2017-11-16 12:01:43.3748|UploadFileImpl. File chunk taken. CountBytes: "2097152" 2017-11-16 12:02:21.7800|UploadFileImpl. File chunk uploaded. Offset: "3909091328"
Uploaded 2mb in 40 sec. ~ 50 kb/sec
Any ideas?
PS. Client's internet connection is 5-20 mb/sec.
The web site uses a somewhat different piece of infrastructure than the API, so that may not be a good comparison.
If you want to test your connection to the Dropbox API content servers directly though, you can test a simpler /2/files/upload API call, e.g., using curl:
https://www.dropbox.com/developers/documentation/http/documentation#files-upload
That would eliminate the complexity of using upload sessions, and let you see what kind of speeds you're getting for a single connection.
That is all clear, thanks.
But speed is 50 kb/sec...
How can we test the uploading speed to find the error? Should we upload a file via browser and check if the uploading speed is equal?
P.S.
We use a dynamic chunk size. If we receive a timeout error then we start to upload from the beginning with reduced chunk size. By default we upload chunk size = 8 mb.
The web site uses a somewhat different piece of infrastructure than the API, so that may not be a good comparison.
If you want to test your connection to the Dropbox API content servers directly though, you can test a simpler /2/files/upload API call, e.g., using curl:
https://www.dropbox.com/developers/documentation/http/documentation#files-upload
That would eliminate the complexity of using upload sessions, and let you see what kind of speeds you're getting for a single connection.
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!