diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2012-12-19 04:19:57 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2012-12-19 04:19:57 -0800 |
commit | e73a47a824c639f3e8ae83f8d52b590d60f065be (patch) | |
tree | 646f4720253ca40575d66c1af8d4c6901689b01c | |
parent | ad497d23ec65dc8bf192097bbfc0b4241c74e7a0 (diff) | |
parent | 186147d1eefaffc4c548746a30e417f7ce4d3a36 (diff) | |
download | nextcloud-server-e73a47a824c639f3e8ae83f8d52b590d60f065be.tar.gz nextcloud-server-e73a47a824c639f3e8ae83f8d52b590d60f065be.zip |
Merge pull request #954 from owncloud/download-progress-master
refs #933 send content length header - this will allow the browser to sh...
-rw-r--r-- | lib/files.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/files.php b/lib/files.php index f8bae778ed2..69097e41074 100644 --- a/lib/files.php +++ b/lib/files.php @@ -212,6 +212,7 @@ class OC_Files { self::addSendfileHeader($filename); }else{ header('Content-Type: '.OC_Filesystem::getMimeType($filename)); + header("Content-Length: ".OC_Filesystem::filesize($filename)); $storage = OC_Filesystem::getStorage($filename); if ($storage instanceof OC_Filestorage_Local) { self::addSendfileHeader(OC_Filesystem::getLocalFile($filename)); @@ -227,8 +228,6 @@ class OC_Files { die('403 Forbidden'); } if($only_header) { - if(!$zip) - header("Content-Length: ".OC_Filesystem::filesize($filename)); return ; } if($zip) { |