指定的blob不存在-在Azure浏览器中显示-但在我单击时下载不存在 [英] The specified blob does not exist - Shows in azure browser - but when I click download does not exist
本文介绍了指定的blob不存在-在Azure浏览器中显示-但在我单击时下载不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已将一些Blob上载到azure
。
它们在我登录时显示在浏览器中,但当我尝试下载它们时,收到以下消息:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>BlobNotFound</Code>
<Message>
The specified blob does not exist. RequestId:d3cd1a18-1e48-47bd-9985-4ab7e655eed2 Time:2013-09-19T15:02:16.4158548Z
</Message>
</Error>
屏幕快照浏览(显示Blob)
显示单击下载后发生的情况的屏幕快照推荐答案
我想我知道您遇到此问题的原因。我想这是传送门的问题。如果您注意到,您的blob的名称是:Tommy French Toals.North Street.1250251
,并且它包含空格。但是,如果您查看URL,则名称为:Tommy%2520French%2520Toals.North%2520Street.1250251
。请注意%2520
的存在。门户软件正在执行两次URL编码-首先,它将blob名称中的space
URL编码为%20
,然后再将%
符号编码为%25
,这会给您带来麻烦。
CloudStorageAccount storageAccount = new CloudStorageAccount(new StorageCredentials("myaccount", "myaccountkey"), true);
var blobContainer = storageAccount.CreateCloudBlobClient().GetContainerReference("mycontainer");
var blob = blobContainer.GetBlockBlobReference("this file has spaces in its name.txt");
var sas = blob.GetSharedAccessSignature(new SharedAccessBlobPolicy()
{
SharedAccessExpiryTime = DateTime.UtcNow.AddHours(1),
Permissions = SharedAccessBlobPermissions.Read,
});
var sasUrl = blob.Uri.AbsoluteUri + sas;
尝试下载名称中不包含空格或任何特殊字符的文件,应该可以正常工作。
这篇关于指定的blob不存在-在Azure浏览器中显示-但在我单击时下载不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文