Merge pull request #954 from owncloud/download-progress-master

refs #933 send content length header - this will allow the browser to sh...
This commit is contained in:
Thomas Müller 2012-12-19 04:19:57 -08:00
commit e73a47a824
1 changed files with 1 additions and 2 deletions

View File

@ -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) {