Merge pull request #1111 from Gamesh/patch-1
[*] FO: now you can download files >1G without running into max executio...
This commit is contained in:
@@ -278,6 +278,8 @@ class GetFileControllerCore extends FrontController
|
|||||||
header('Content-Type: '.$mimeType);
|
header('Content-Type: '.$mimeType);
|
||||||
header('Content-Length: '.filesize($file));
|
header('Content-Length: '.filesize($file));
|
||||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||||
|
//prevents max execution timeout, when reading large files
|
||||||
|
@set_time_limit(0);
|
||||||
$fp = fopen($file, 'rb');
|
$fp = fopen($file, 'rb');
|
||||||
while (!feof($fp))
|
while (!feof($fp))
|
||||||
echo fgets($fp, 16384);
|
echo fgets($fp, 16384);
|
||||||
|
|||||||
Reference in New Issue
Block a user