How do I add a link to a PDF in the content, so that it downloads rather than opens in the browser windows? (I’ve uploaded the PDF to the media library and can insert the link but can’t find an option to prevent it opening in the browser window).

Thanks,

Lucy

4 s
4

you may try to add this to your .htaccess :

<FilesMatch "\.(?i:pdf)$">
    # Force File Download
    ForceType application/octet-stream
    Header set Content-Disposition attachment
</FilesMatch>

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *