Hi,
I’m using some categories for discussing / viewing pdfs (scientific reviews). I’d like to prevent Discourse / my Safari desktop browser from putting each file into my download folder. The pdf should be viewable in the current tab/window. How can I set this?
In case of visiting Discourse via iPad or any other kind of mobile device, it’s just working fine by design. But those screen resolutions are sometimes too low. Any ideas? CSS snippets?
###I found this, but I don’t know how to set this globaly:
Big thanks so far and
wish you all a pleasant weekend
According to other sources, the adobe-pdf-plugin itself is problematic and has to be deleted (apparently by searching for “adobe plug” without the “” in the finder and then deleting them.
Using the reverse search (for how to download pdfs instead of opening them in the browserwindow) I found this:
The first reply has some code snippets. Changing the YES to a NO yields: defaults write com.apple.Safari WebKitOmitPDFSupport -bool NO
These suggestions not in any specific order. I don’t know your system configuration nor do I own a mac. Everything you try is on your own risk!
But please, don’t try to change download behaviour on the server-side. It would mean that you are making your problem into anybodies problem. And that is not the way to go.
I’ve just tested this with a somewhat vanilla Discourse install and Safari: here, Safari opens all PDF documents instead of downloading them. So either your Safari, or the site settings of that Discourse instance seem to be the culprit…
I didn’t found any client side option to force view pdfs in browser. Actually, I noticed the same behaviour on Firefox and Chrome as well. All of them are downloading the pdfs. Thats very annoying in long term. And I didn’t wanna use third-party pdf viewer e.g. Adobe Acrobat. I want it natively.
It’s not a client side issue / feature. This happens only on Discourse. With ALL browsers. On other sites were pdfs are directly linked to any kind of server path url working fine.
Until now, I didn’t found anything specific in Github by searching class="attachment".
Maybe some stuff member know how to perform a force open in browser window. @codinghorror ?
I don’t know. The download folder isn’t just normal folder as I can see. It’s something script-based magic for me that requests login credentials if you’re not loged into the system, some kind of file manager. Is this part of Ngnix? Is it possible to change this behaviour?
No, I meant that the Nginx proxy of your discourse instance somewhere does this trick: http://mikepricetw.com/force-file-download-nginx-apache/
…which would force the download. Are you running a standard Docker install with everything on the latest version?