FTPSync: Force PDF Download

Download forcing works with a special HTTP header sent by the server to the browser. For files hosted on a remote server (e.g. added with Cloud Sync), the force download option provided by WP-Filebase does not take effect.

WP-Filebase redirects the download request to the remote server and thus has no influence on how this server will serve the file to the browser, i.e. what HTTP headers are sent.

To force PDF download on FTP sites create a .htaccess file in the FTP root directory:

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

You must specify the HTTP url in FTP sync settings.

VN:F [1.9.22_1171]
Rating: 5.0/5 (2 votes cast)
FTPSync: Force PDF Download, 5.0 out of 5 based on 2 ratings

One thought on “FTPSync: Force PDF Download

  1. Floutsch says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    I’d reccommend to drop the last bracket which is double 🙂

Leave a Reply

Your email address will not be published.