title: Uploading blockblob and setting contenttype
body: <p>I'm using <code>Microsoft.WindowsAzure.Storage.*</code> library from C#.</p>
  
  <p>This is how I'm uploading things to storage:</p>
  
  <pre><code>// Store in storage
  CloudStorageAccount storageAccount = CloudStorageAccount.Parse("...connection string...");
  CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
  CloudBlobContainer container = blobClient.GetContainerReference("pictures");
  
  // Create container if it doesnt exist
  container.CreateIfNotExists();
  
  // Make available to everyone
  container.SetPermissions(new BlobContainerPermissions
  {
      PublicAccess = BlobContainerPublicAccessType.Blob
  });
  
  // Save image
  CloudBlockBlob blockBlob = container.GetBlockBlobReference("blah.jpg");
  blockBlob.UploadFromByteArray(byteArrayThumbnail, 0, byteArrayThumbnail.Length);
  blockBlob.Properties.ContentType = "image/jpg";  // *** NOT WORKING ***
  </code></pre>
  
  <p>All the things I upload to the storage are being saved with content type "application/octet-stream", even though I'm using the setter with value "image/jpg" (see the last line in my code).</p>
  
  <p>So question #1: Why isn't working the ContentType setter?</p>
  
  <p>And question #2: If I manually change the content type to "image/jpg", using Windows Azure management portal, and then copy the absolute URI of the file to the browser's address field, and press enter, the jpg file is downloaded instead of displayed.  Isn't this mime type supposed to be displayed instead of downloaded? How do I change this?</p>