Page MenuHomePhabricator

Add ?download to .htaccess of images directory
Open, Needs TriagePublic

Description

We've had a convention of use ?download to trigger downloads instead of having them open in the browser for a long while.

we should probably make that part of our default .htaccess, now that that convention is used by several places like Mediaviewer, TMH and gadgets.

RewriteEngine On

RewriteCond %{REQUEST_URI} ^/images.*
RewriteCond %{QUERY_STRING} ^download$
RewriteRule .* - [E=DOWNLOAD:yes]
Header set "Content-Disposition" "attachment" env=DOWNLOAD