mirror of
https://gitlab.com/mojo42/Jirafeau.git
synced 2025-01-17 21:08:20 +01:00
f.php fix bad file name when browser cannot preview file
This permits to have the original file name when browser force user to download the file because he cannot preview it. closes #24
This commit is contained in:
parent
a41981033b
commit
a80b0189a7
5
f.php
5
f.php
@ -220,8 +220,9 @@ if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_prev
|
||||
header ('HTTP/1.0 200 OK');
|
||||
header ('Content-Length: ' . $link['file_size']);
|
||||
if (!jirafeau_is_viewable ($link['mime_type']) || !$cfg['preview'] || $do_download)
|
||||
header ('Content-Disposition: attachment; filename="' .
|
||||
$link['file_name'] . '"');
|
||||
header ('Content-Disposition: attachment; filename="' . $link['file_name'] . '"');
|
||||
else
|
||||
header ('Content-Disposition: filename="' . $link['file_name'] . '"');
|
||||
header ('Content-Type: ' . $link['mime_type']);
|
||||
|
||||
/* Read encrypted file. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user