I'm currently having issue with Azure File storage when I build up a URL with a shared access signature (SAS) Token. The file will download in the browser, but the content-type is always application/octet-stream rather than changing to match the mime type of the file. If I put the file in Azure BLOB storage and build up a URL with a SAS Token, it sends the correct content-type for my file (image/jpeg).
I've upgraded my storage account from V1 to V2 thinking that was the problem, but it didn't fix it.
Does anyone have a clue what I could try that might get Azure File storage to return the correct content-type using a URL with SAS Token to download the file?
image/png
. I was able to see the file properly and the response headers contain proper content-type header value. – Gaurav MantriI've upgraded my storage account from V1 to V2 thinking that was the problem, but it didn't fix it.
- Off topic comment: Please be aware of the costs of V2 storage accounts. They are more expensive than V1 accounts. – Gaurav Mantriapplication/octet-stream
. You would need to make a separate REST API call to File Service to fetch a file's properties. Not all properties for a file are returned as part of listing operation. You can use Microsoft's Storage Explorer to see a file's properties. – Gaurav Mantri