On my web I want to have two buttons - first Download that should download a pdf to the user\'s computer and another View that opens pdf in a new t
Download
View
In the end, as I use nginx, I decided to solve this at http-server level:
location /media { alias /srv/www/novacek/media/; } location /download/media { alias /srv/www/novacek/media/; add_header Content-Disposition "attachment"; }