public static CloudBlockBlob UploadAndSaveBlob(CloudBlobContainer blobContainer, String text, String contentType, String extension) { string blobName = Guid.NewGuid().ToString() + extension; // Retrieve reference to a blob. CloudBlockBlob blob = blobContainer.GetBlockBlobReference(blobName); // Create the blob by uploading a local file. blob.UploadText(text); // Set the Blob content type blob.Properties.ContentType = contentType; blob.SetProperties(); logger.Info(String.Format("Uploaded text file to {0}", blob.Uri)); return blob; }
and call the method, passing in a contentType of "video/mp4" for example.
This will set a ContentType Property on your Blob.
Also, you will probably need to install a WebM plugin for IE (which is oddly enough put out by Google, nice to see they're looking out for IE).
No comments:
Post a Comment