fsprojects / AzureStorageTypeProvider

An F# Azure Type Provider which can be used to explore Blob, Table and Queue Azure Storage assets and easily apply CRUD operations on them.
http://fsprojects.github.io/AzureStorageTypeProvider/
The Unlicense
84 stars 34 forks source link

Set ContentType on upload #103

Closed isaacabraham closed 7 years ago

isaacabraham commented 7 years ago

When uploading a blob, we currently do not set the Content Type. This should be relatively simple to do:

let contentType = System.Web.MimeMapping.GetMimeMapping "myFile.jpeg" // sets to "image/jpeg"
blockBlob.Properties.ContentType <- contentType // set content type locally
blockBlob.UploadFromFile "myFile.jpeg" // uploads and sets content type on server