dropbox-sdk-dotnet
dropbox-sdk-dotnet copied to clipboard
Chunk Upload fails with incorrect_offset on files larger than 2GB
When calling ChunkUpload with files over 2GB, the line 499 from dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs overflows due to the following code:
UploadSessionCursor cursor = new UploadSessionCursor(sessionId, (ulong)(chunkSize * idx));
since both chunkSize and idx are ints. This line overflows the int and leads the UploadSessionAppendV2Async call to return invalid_offset. To fix this, chunkSize should be a uint, and idx should be explicitly sized as a ulong.
Thanks for the report! I'll ask the team to fix that up.