diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/files.php b/lib/files.php index a7b83149574..107605fc34e 100644 --- a/lib/files.php +++ b/lib/files.php @@ -119,7 +119,14 @@ class OC_Files { } @ob_end_clean(); if($zip){ - readfile($filename); + $handle=fopen($filename,'r'); + if ($handle) { + $chunkSize = 8*1024;// 1 MB chunks + while (!feof($handle)) { + echo fread($handle, $chunkSize); + flush(); + } + } unlink($filename); }else{ OC_Filesystem::readfile($filename); |