![](/img/trans.png)
[英]How can I tell when CopyDirectoryAsync from Microsoft.WindowsAzure.Storage.DataMovement.TransferManager has finished?
[英]How to use WindowsAzure.Storage.DataMovement?
TransferManager.UploadAsync(@"C:\data2.flac",
destinationBlob,
null,
context,
CancellationToken.None).Wait();
當我上傳到block blob
存儲時,此代碼完美工作。
上傳到page blob
時如何使用WindowsAzure.Storage.DataMovement
?
現在我明白了
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> Microsoft.WindowsAzure.Storage.DataMovement.TransferException: File size 274.02MB is invalid for PageBlob, must be a multiple of 512 bytes.
如錯誤消息所述,為了將文件上傳為頁面Blob,文件的大小必須為512字節的倍數。 由於您的文件不符合此條件,因此上傳失敗。 您需要指定一個與此大小限制匹配的文件。
出現此大小限制的原因是因為您將這些頁面Blob掛載為驅動器,並將其與虛擬機一起使用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.