Reputation: 19021
I want to include link to download file in my html-page like this
<a href="file_folder/myfile.exe">MyFile</a>
but when I click to my link I can see binary code of my file in browser instead redirect to download file. How I can fix it without change settings of my web-server?
Upvotes: 0
Views: 228
Reputation: 4775
This is an old question but there is a way to do this now (see the download attribute):
<a href="hugepdf.pdf" download>Download file</a>
As explained by Jonathan Svärdén.
Upvotes: 0
Reputation: 38400
You can't. The only way is to change the sent MIME type on the web server. application/octet-stream
would be a good choice.
Upvotes: 2