One can only load files with .txt , HTML etc like file extensions from Azure blob onto a browser. Is there a list of filetypes supported for browser loading from blob storage? Can one configure a storage account to, similarly, load Markdown files too like Github can load .md files like below?
https://raw.githubusercontent.com/PowerShell/PowerShell/master/README.md
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@Ayanmullick
Thanks for the question! We are investigating and will update you shortly.
@Ayanmullick Firstly, apologies for the delay in responding here .
Just for clarification Have you refereed : Supported file formats and compression codecs https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-blob-storage
However I will assign this to author for more informtion
I found documentation about file formats supported for hosting. However, I couldn't find any documentation about file formats for browser loading and how to configure a storage account to enable browser loading of markdown files.
@Ayanmulick my understanding is that if the browser can read a file, it doesn't matter what server is serving up the files. The browser interprets how to present a file based on recognized extensions. A browser can absolutely load markdown files from your storage account via a static site. Are you experiencing something different? Thank you.
@Ayanmullick sorry - I missed one "L" in my last response. Pasted again - my understanding is that if the browser can read a file, it doesn't matter what server is serving up the files. The browser interprets how to present a file based on recognized extensions. A browser can absolutely load markdown files from your storage account via a static site. Are you experiencing something different? Thank you.
@normesta , Currently a storage account only loads Text and HTML files. Markdown files prompt download. PFB example links and screenclip.
Markdown: https://abhishektest.z13.web.core.windows.net/test.md

Thanks @Ayanmullick for clarifying. Looks like your just using straight blob storage (not static website). for example, your URL is ayn.blob.core.windows.net. You'll need to create a static website to ensure that the contents of your markdown file appear in the browser. After you create a static website, your URL will be something like ayn.z22.web.core.windows.net/. If your just using straight blob storage (no static site), I'm not really sure why any file would show the contents in the browser. It might just be based on the content type of the file and how the browser chooses to treat that content type. However, if you create a static site (as per the guidance in this topic), your markdown files should appear just fine. For example, here's one I set up as a test - https://normestablobaccount.z22.web.core.windows.net/data-lake-storage-supported-open-source-platforms.md
@normesta , Funny, your page loads. Mine doesn't, even thru static site link. I'll talk to support.
@Alanmullick - Ug. Sorry. Yes please do work with support and I'd love it if you could post back to this issue if this article is missing a key piece of guidance or hint that could save others from this. BTW, I uploaded your file to my endpoint and it renders correctly - https://normestablobaccount.z22.web.core.windows.net/HelloMarkdown.md so something strange is happening there. It's possible that the content type is missing from the file metadata. If the browser uses that metadata to determine how to present the file, then having that set to text/plain would be important. Try using Storage Explorer to browse your $Web directory and see if the content type is set text/plain. I'm just guessing on this. The content type appears in one of the columns in Storage Explorer. Thank you!
@normesta , The ContentType property of a blob determines if the browser can load it. Manually uploading from the Portal sets the ContentType to application/octet-stream by default. Uploading from the latest version of the desktop version of Storage Explorer sets the ContentType to text/plain; charset=utf-8 which works on the browser. Or one could explicitly set the content type of a blob while uploading thru PowerShell like below.
Set-AzStorageBlobContent -File <> -Container <> -Blob test.md -Context $Storage.Context -Properties @{"ContentType" = "text/plain"} -Verbose
@Ayanmullick - Very cool. Glad you've gotten around this. I'll update this article - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website-how-to?tabs=azure-portal. That article has three tabs. The PowerShell and CLI tabs already give the content type in the command examples. The Portal version contains no guidance for uploading files. I'll add a section that recommends tools for uploading to the $Web folder and in cases where folks choose to use the Storage Explorer inside of the Portal, they'll have to modify the properties after uploading the file - Basically - right-click file and then click Properties. There, they can change the content type. Does this sound about right? Thank you for getting back to me!
Yes @normesta , exactly. And maybe add that page to the Next Steps section of this page.