Skip to content
Snippets Groups Projects
Commit 1b5a0bb3 authored by Steven's avatar Steven
Browse files

Fix content type header in downloads

parent 91acafe6
Branches
No related tags found
No related merge requests found
...@@ -137,8 +137,10 @@ class OC_FILES { ...@@ -137,8 +137,10 @@ class OC_FILES {
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public'); header('Pragma: public');
if($zip){ if($zip){
header('Content-Type: application/zip');
header('Content-Length: ' . filesize($filename)); header('Content-Length: ' . filesize($filename));
}else{ }else{
header('Content-Type: ' . OC_FILESYSTEM::getMimeType($filename));
header('Content-Length: ' . OC_FILESYSTEM::filesize($filename)); header('Content-Length: ' . OC_FILESYSTEM::filesize($filename));
} }
}elseif($zip or !OC_FILESYSTEM::file_exists($filename)){ }elseif($zip or !OC_FILESYSTEM::file_exists($filename)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment