Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set the MIME type for a BLOB already in Azure Storage
using Microsoft.WindowsAzure.Storage;
using System.IO;
var account = CloudStorageAccount.Parse("YourStorageConnectionString");
var client = account.CreateCloudBlobClient();
var container = client.GetContainerReference(GetAzureContainerByFileType(type));
var blob = container.GetBlockBlobReference("myphoto.jpg");
blob.Properties.ContentType = "image/jpeg";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment