![](/img/trans.png)
[英]Sync DB in cloud to on-prem for Read scale --how to trigger the sync?
[英]How to overcome 4Gb limitation on file download in virtual drive based on Cloud Sync Engine?
我正在使用 Cloud Files API 和這個項目實現一個虛擬驅動器。 但是,下載會停留在大於 4Gb 的文件上。 進度停止,並且永遠不會再次調用 TransferDataAsync(),即使文件中還有更多字節。
您需要將可選長度添加到段長度:
public async Task TransferDataAsync(long offset, long length,
ITransferDataOperationContext operationContext, ITransferDataResultContext resultContext)
{
if (operationContext.FileSize > 0x100000000)
{
length += operationContext.OptionalLength;
}
…
}
根據我的經驗,這會稍微減慢小文件的下載速度。 因此,僅對超過 4Gb 的文件執行此操作才有意義。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.