summaryrefslogtreecommitdiff
path: root/www/functions/func_download.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/functions/func_download.php')
-rw-r--r--www/functions/func_download.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/www/functions/func_download.php b/www/functions/func_download.php
index 64c5d90..d9be089 100644
--- a/www/functions/func_download.php
+++ b/www/functions/func_download.php
@@ -103,7 +103,10 @@ function download_file($db, $file_id){
//TODO: buffer output, print if reading == true
header("Content-Type: ".$file_mime);
- header("Content-Disposition: attachment; filename=\"".$file_name."\"");
+
+ if(!preg_match("/^image\/.+/", $file_mime)){
+ header("Content-Disposition: attachment; filename=\"".$file_name."\"");
+ }
header("Content-Length: ".$file_size);
set_time_limit(0);
$uncompressed_file = readgzfile($gzip_file);