Including filename in nginx response for media.

This commit is contained in:
Roland 2022-12-12 13:41:44 -07:00
parent 3eef62f14a
commit c6e298448a
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 6 additions and 0 deletions

View file

@ -60,6 +60,9 @@ http {
}
location /media {
if ( $request_filename ~ '^.*/(.+)$' ) {
add_header Content-Disposition 'attachment; filename="$1"';
}
# The media files mounted in the docker volume
sendfile on;

View file

@ -50,6 +50,9 @@ http {
}
location /media {
if ( $request_filename ~ '^.*/(.+)$' ) {
add_header Content-Disposition 'attachment; filename="$1"';
}
# The media files mounted in the docker volume
sendfile on;