mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Fix content type header in downloads
This commit is contained in:
parent
91acafe698
commit
1b5a0bb31e
1 changed files with 2 additions and 0 deletions
2
inc/lib_files.php
Normal file → Executable file
2
inc/lib_files.php
Normal file → Executable file
|
|
@ -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)){
|
||||
|
|
|
|||
Loading…
Reference in a new issue