[*] FO: now you can download files >1G without running into max execution limitation

when reading large files ( >1G ), you often get max execution timeout error, this fix will prevent this.
This commit is contained in:
Gamesh
2013-12-09 08:53:11 +02:00
parent 1876d4834c
commit 9713d38078
+2
View File
@@ -278,6 +278,8 @@ class GetFileControllerCore extends FrontController
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);