summaryrefslogtreecommitdiffstats
path: root/lib/filesystemview.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-26 14:21:06 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-26 14:21:06 +0100
commitd4d09b06f80462394983fe04d291a0345dd57280 (patch)
treee4452055533c7ec7bb6fa49ac7f6b5c93ba8c4f7 /lib/filesystemview.php
parentea8f71a19c59e7138d4a504bacc0beb410fc77e8 (diff)
parent3d0d47957e65a72e17d33a924c9c4efcd5088ed2 (diff)
downloadnextcloud-server-d4d09b06f80462394983fe04d291a0345dd57280.tar.gz
nextcloud-server-d4d09b06f80462394983fe04d291a0345dd57280.zip
merge master into encryption
Diffstat (limited to 'lib/filesystemview.php')
-rw-r--r--lib/filesystemview.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index c4d5ff35142..ba1490dd276 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -136,7 +136,14 @@ class OC_FilesystemView {
return $this->basicOperation('filesize',$path);
}
public function readfile($path){
- return $this->basicOperation('readfile',$path,array('read'));
+ $handle=$this->fopen($path,'r');
+ $chunkSize = 1024*1024;// 1 MB chunks
+ while (!feof($handle)) {
+ echo fread($handle, $chunkSize);
+ @ob_flush();
+ flush();
+ }
+ return $this->filesize($path);
}
public function is_readable($path){
return $this->basicOperation('is_readable',$path);