summaryrefslogtreecommitdiffstats
path: root/lib/filesystemview.php
diff options
context:
space:
mode:
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);