Monday, March 25, 2019

Issue with pdf/jpg on Azure webapp.

Hi all,

I have ran into an issue with my Azure web app. It's a personal site and I have a .jpg image and my resume as .pdf so that users can click and download it. It worked when my resume was .docx but neither the .jpg or .pdf are working now.

The console shows:

WebProfile.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)

And when I click on the link for my resume it gives me:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Looking online I found that modifying the web.config with the below line should work, but I've been unsuccessful. I thought maybe it had something to do with it being an Azure hosted webapp. Any help is very much appreciated.

<mimeMap fileExtension=".pdf" mimeType="application/octet-stream"/>

or

<mimeMap fileExtension=".pdf" mimeType="application/pdf"

EDIT: Everything seems to work fine locally, it's once it has been pushed up to Azure that it breaks.

Issue with pdf/jpg on Azure webapp. Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team