2

Trigger a file download: https://alwaysepst.blob.core.windows.net/ulm-my/Projects/UnileverMT/CompetitorReport/201901/AeonBigAmpangOverdue11days_20190111T170348680.jpg

Opens a webpage: http://personal.psu.edu/xqz5228/jpg.jpg

Kevin Ng
  • 448
  • 5
  • 13
  • Sometimes there's JS working behind the scenes on some servers https://stackoverflow.com/questions/8908022/open-image-in-new-window – Russ J Feb 15 '19 at 04:30
  • https://stackoverflow.com/questions/6796974/force-download-an-image-using-javascript/6799284#6799284 – Russ J Feb 15 '19 at 04:31
  • If you change the MIME TYPE, you can change whether the browser downloads or opens in an internal viewer: https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Configuring_server_MIME_types – Ringo Feb 15 '19 at 04:44

1 Answers1

1

The server that the first url points to returns a header Content-Type: application/octet-stream which tells the browser to trigger a file download whereas the second url has a header Content-Type: image/jpeg which the browser is able to interpret by itself as an image file.

If you were trying to create this behaviour, the first example isn't really an accepted way of triggering a download. See this answer for more details on that.

There's also a download attribute for the a element in html. See here.