Mark Mark - 1 year ago 102
HTML Question

Download from Azure storage in html link

So I have a file uploaded to my azure storage and have a simple anchor tag where a user should be able to simply download the file. This is not working and not understanding why.

My code:

<a href=" Interview Worksheet.pptx">Get Worksheet Here!</a>

When you click on the link to download, it takes to an error saying invalid http header. This is a simple powerpoint file. If I go to the file properties within Azure, I can click download and it does fine.

Any thoughts to how I can resolve this?

Answer Source

Your URL is pointing to Azure File storage, which is not quite the same as raw blobs. That is, you cannot just access individual files within the Azure File store without proper authentication (e.g. mounting the smb volume, using the API, Shared Access Signature, etc), even though File Storage is backed by blob storage.

If you truly stored the object in a blob (vs File Storage), then the url should look something like:

Notice the URL contains blob vs file.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download