[英]How to use WindowsAzure.Storage.DataMovement?
TransferManager.UploadAsync(@"C:\data2.flac",
destinationBlob,
null,
context,
CancellationToken.None).Wait();
This code perfectly works when I upload to block blob
storage. 当我上传到
block blob
存储时,此代码完美工作。
How can I use WindowsAzure.Storage.DataMovement
when I upload to page blob
? 上传到
page blob
时如何使用WindowsAzure.Storage.DataMovement
?
Now I get 现在我明白了
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.
As the error message states, in order to upload a file as page blob the size of the file must be a multiple of 512 bytes. 如错误消息所述,为了将文件上传为页面Blob,文件的大小必须为512字节的倍数。 Because your file does not match this criteria, your upload is failing.
由于您的文件不符合此条件,因此上传失败。 You would need to specify a file which matches this size restriction.
您需要指定一个与此大小限制匹配的文件。
The reason there's this size restriction is because you mount these page blobs as drives and use them with your Virtual Machines. 出现此大小限制的原因是因为您将这些页面Blob挂载为驱动器,并将其与虚拟机一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.