简体   繁体   中英

Azure upload blob with tokes sas

I've recently upgrade Microsoft.Azure.Storage.DataMovement Nuget package from 0.9.0 version to 0.12.0 version and I'm having some issues in my code... with previous version it's running fine.

CloudBlockBlob blockBlob = new CloudBlockBlob(new Uri(sConnString)); 
...
var task = TransferManager.UploadAsync(pathFile, blockBlob, null, context, CancellationToken.None);                
task.Wait();

I had to changed blob definition into:

CloudBlob blockBlob = new CloudBlob(new Uri(sConnString));

But now I receive this error from UploadAsync: One or more errors occurred. (The given blob type Unspecified is not supported.)

Before upgrading DataMovement library it was working fine. What happened with latest version? How can I solve?

Thank you very much.

To make the answer visible to others, I'm summarizing the answer shared in comment as below:

The issue was resovled by using CloudBlockBlob instead of CloudBlob.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM