Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
This code get error on method UploadSessionAppendV2Async after 4gb upload.
static async Task ChunkUpload(DropboxClient client, String path, FileStream stream, int chunkSize) { int numChunks = (int)Math.Ceiling((double)stream.Length / chunkSize); byte[] buffer = new byte[chunkSize]; string sessionId = ""; for (int idx = 0; idx < numChunks; idx++) { int bytesRead = stream.Read(buffer, 0, chunkSize); using (var memStream = new MemoryStream(buffer, 0, bytesRead)) { if (idx == 0) { var result = await client.Files.UploadSessionStartAsync(false, memStream); sessionId = result.SessionId; } else { var cursor = new UploadSessionCursor(sessionId, (ulong)((uint)chunkSize * (uint)idx)); if (idx == numChunks - 1) { FileMetadata fileMetadata = await client.Files.UploadSessionFinishAsync(cursor, new CommitInfo(path), memStream); } else { await client.Files.UploadSessionAppendV2Async(cursor, false, memStream); } } } } }
works fine, thanks.
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!