diff options
author | Steven <wokste@gmail.com> | 2010-09-26 19:09:16 +0200 |
---|---|---|
committer | Steven <wokste@gmail.com> | 2010-09-26 19:09:16 +0200 |
commit | 1b5a0bb31e9af496fd1bea3f20ec5c925f01a923 (patch) | |
tree | 37d82262b0f677008551f4ace5174f1c5408f672 | |
parent | 91acafe6984e4e8602769375dbd6cde619e551bf (diff) | |
download | nextcloud-server-1b5a0bb31e9af496fd1bea3f20ec5c925f01a923.tar.gz nextcloud-server-1b5a0bb31e9af496fd1bea3f20ec5c925f01a923.zip |
Fix content type header in downloads
-rwxr-xr-x[-rw-r--r--] | inc/lib_files.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/inc/lib_files.php b/inc/lib_files.php index 009de854d3f..94eff9ce59c 100644..100755 --- a/inc/lib_files.php +++ b/inc/lib_files.php @@ -137,8 +137,10 @@ class OC_FILES { header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); if($zip){ + header('Content-Type: application/zip'); header('Content-Length: ' . filesize($filename)); }else{ + header('Content-Type: ' . OC_FILESYSTEM::getMimeType($filename)); header('Content-Length: ' . OC_FILESYSTEM::filesize($filename)); } }elseif($zip or !OC_FILESYSTEM::file_exists($filename)){ |