summaryrefslogtreecommitdiff
path: root/www/functions
diff options
context:
space:
mode:
authorroot2014-04-15 23:22:52 +0200
committerroot2014-04-15 23:22:52 +0200
commit3dc852b163daba5fa59499215f8b725a6f0a39eb (patch)
tree3dbe01067ca7a05d4429953a8fb9ed887edaecf3 /www/functions
parentb1de761bff5668809b346916f863278a9b516d07 (diff)
downloadfiles.iamfabulous.de-3dc852b163daba5fa59499215f8b725a6f0a39eb.tar.gz
Added 404 message for internal server redirect.
Diffstat (limited to 'www/functions')
-rw-r--r--www/functions/func_download.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/www/functions/func_download.php b/www/functions/func_download.php
index d9be089..26b25b1 100644
--- a/www/functions/func_download.php
+++ b/www/functions/func_download.php
@@ -106,6 +106,8 @@ function download_file($db, $file_id){
if(!preg_match("/^image\/.+/", $file_mime)){
header("Content-Disposition: attachment; filename=\"".$file_name."\"");
+ } else {
+ header("filename=".$file_name."");
}
header("Content-Length: ".$file_size);
set_time_limit(0);