Start a new topic

Anyway to force the download of files like PDFs instead of viewing in browser?

JayFiveAlive @ Wed Aug 06 22:27:27 EEST 2014
On most browsers when I try to download a direct link to a PDF, the file will open in the brower's pdf viewer, then you must save as the file to download like a zip file for example (download to your default file location). Is there a way to force the direct links to always download instead of viewing in a web browser?

Might be a bit of a bizarre request ha, but Chrome on the new Mac OS Yosemite is obliterating PDF's color when opened in the browser. It seems like every browser handles the PDFs a little different, that's why it would be nice to force it to download.

spinkb @ Thu Aug 07 02:23:34 EEST 2014
In your WebInterface folder, mime_types.txt, remove the PDF mime type.

That should do it.

JayFiveAlive @ Thu Aug 07 09:20:07 EEST 2014
Hmm no luck. I removed ".pdf application/pdf" from mime_types, saved and restarted the server, but my pdf link still views in Chrome's pdf viewer instead of downloading.
spinkb @ Thu Aug 07 11:14:12 EEST 2014
The PDF viewer is overriding and taking the file regardless.

Why don't you'd usable the PDF viewer in chrome?

JayFiveAlive @ Thu Aug 07 11:59:47 EEST 2014
Good call, that works for me though anyone we share with that's probably not feasible. I wasn't sure if there was a way around that to force a download. Ohhh well :)
Login to post a comment