I am implementing a virtual drive using Cloud Files API and this project. However, the download is stuck on files larger than 4Gb. The progress stops and the TransferDataAsync() is never called again, even though there are more bytes left in the file.
Asked
Active
Viewed 62 times
1 Answers
4
You need to add optional length to the segment length:
public async Task TransferDataAsync(long offset, long length,
ITransferDataOperationContext operationContext, ITransferDataResultContext resultContext)
{
if (operationContext.FileSize > 0x100000000)
{
length += operationContext.OptionalLength;
}
…
}
From my experience, this will somewhat slow down the download for small files. So it makes sense to do this only for files over 4Gb.

Vladislav Scherbinin
- 152
- 1
- 5