I've uploaded some blobs to azure
.
They show in the browser when I log in, but when I attempt to download them I get following message:
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>
Screenshot browsing (showing the blobs)
Screenshot showing what happens after I click download
I think I know why you're running into this issue. I believe its an issue with the portal. If you notice, the name of your blob is: Tommy French Toals.North Street.1250251
and it contains spaces. However if you look at the URL the name is coming as: Tommy%2520French%2520Toals.North%2520Street.1250251
. Notice the presence of %2520
. What portal software is doing is that it is performing URL encoding twice - first, it URL encodes space
in the blob name to %20
and then again URL encodes the %
sign to %25
and this is messing things up for you.
Just to be double sure, I uploaded a file which contains spaces in its name in my storage account and when I try to download the blob through the portal, it failed with the same error as yours. Then I created a SAS URI for the same blob using storage client library, and it worked perfectly fine. Here's the code I used for creating SAS URI:
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;
Try downloading a file which does not contain spaces or any special characters in its name and it should work just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With