How can you check if a file is stored in Azure Blob
We have a flash app running on our web site (which is a Azure site). It needs t开发者_如何学Goo access images in blob storage. I had to create a crossdomain.xml file programatically so there won't be any issues with Flash getting cross domain restrictions.
But for some reason, I cannot check to see if that file exists, so every time the page loads it re-creates the file. Every example I look for talks about checking to see if the blob storage container exists, I just want to find this file.
If your blob container is public and you know the name of the blob, you can manually send a HTTP request for the blob (e.g. http://myaccount.blob.core.windows.net/mycontainer/myblob) and check the result. If the result is 404 (Not Found) error, that means the blob does not exist. However if the blob container is private, then what you could do is try and fetch the properties of the blob either by using REST API or Storage Client library. A 404 error would mean that the blob does not exist. However you would need to think about your storage account credentials as you mentioned it is a Flash application and you may not want to store the credentials in the application itself.
Is a tool like Cerebrata's Cloud Storage Studio something that would help? You can browse your Azure storage contents to see if that blob exists, and also see if your application is continuously creating new ones.
The Developer Edition is free.
精彩评论