1
votes

I've tried to delete some files ending in .jpg?12312223 and .jpg?zz=23 (random numbers) from windows azure management portal, but it never works. I've also tried to delete them from CloudBerry Explorer for Azure Blob Storage and get an Error.

Is there any way to delete those files?

Thanks.

1

1 Answers

3
votes

If you're looking for another tool to do so, may I suggest you try Azure Management Studio from Cerebrata (http://www.cerebrata.com). This tool is currently in public beta and can be downloaded from Cerebrata's website home page (Disclosure: I'm part of Cerebrata team).

If you're trying to do it through storage client library, you can try something like this below:

        CloudStorageAccount storageAccount = CloudStorageAccount.DevelopmentStorageAccount;
        CloudBlobContainer blobContainer = storageAccount.CreateCloudBlobClient().GetContainerReference("images");
        CloudBlockBlob blobWithSpecialCharacters = blobContainer.GetBlockBlobReference("filename.txt?j=123123");
        using (MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes("This is sample text")))
        {
            blobWithSpecialCharacters.UploadFromStream(ms);
        }
        blobWithSpecialCharacters.Delete();