With Apache mod_headers:
SetEnvIf Request_URI "([^/]+\.jpg)$" REQUESTED_FILE_BASENAME=$1
SetEnvIf Request_URI "([^/]+\.mp3)$" REQUESTED_FILE_BASENAME=$1
SetEnvIf Request_URI "([^/]+\.pdf)$" REQUESTED_FILE_BASENAME=$1
Header set Content-Disposition "attachment; filename=\"%{REQUESTED_FILE_BASENAME}e\"" env=REQUESTED_FILE_BASENAME
The instructions can be placed inside a .htaccess
file which itself must go in the directory containing your media. You use just about any extension. The following line might also help against aggressive plugins:
Header set Content-Type "application/octet-stream" env=REQUESTED_FILE_BASENAME