Skip to content

Commit

Permalink
Merge pull request #1111 from Gamesh/patch-1
Browse files Browse the repository at this point in the history
[*] FO: now you can download files >1G without running into max executio...
  • Loading branch information
gRoussac committed Dec 9, 2013
2 parents b0c9e73 + 5c496f4 commit 27e8beb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/front/GetFileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ public function init()
header('Content-Type: '.$mimeType);
header('Content-Length: '.filesize($file));
header('Content-Disposition: attachment; filename="'.$filename.'"');
//prevents max execution timeout, when reading large files
@set_time_limit(0);
$fp = fopen($file, 'rb');
while (!feof($fp))
echo fgets($fp, 16384);
Expand Down

0 comments on commit 27e8beb

Please sign in to comment.