Quantcast
Channel: EasyEngine Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 12639

Force download of files

$
0
0

@robbie_berns

try something like this

server {
    listen 80;
    server_name example.com;
    location ~ ^.*/(?P<request_basename>[^/]+\.(pdf))$ {
        root /path/to/pdf/folder/
        add_header Content-Disposition 'attachment; filename="$request_basename"';
    }
}

let me know if that works for you.


Viewing all articles
Browse latest Browse all 12639

Trending Articles