Skip to content
Snippets Groups Projects
Commit e73a47a8 authored by Thomas Müller's avatar Thomas Müller
Browse files

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

refs #933 send content length header - this will allow the browser to sh...
parents ad497d23 186147d1
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment