mirror of
https://github.com/filegator/filegator.git
synced 2025-08-01 22:50:19 +02:00
feof checks
This commit is contained in:
@@ -107,12 +107,14 @@ class DownloadController
|
|||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
$file = $tmpfs->readStream($uniqid);
|
$file = $tmpfs->readStream($uniqid);
|
||||||
while ($file && ! feof($file['stream'])) {
|
if ($file['stream']) {
|
||||||
echo fread($file['stream'], 1024 * 8);
|
while (! feof($file['stream'])) {
|
||||||
ob_flush();
|
echo fread($file['stream'], 1024 * 8);
|
||||||
flush();
|
ob_flush();
|
||||||
|
flush();
|
||||||
|
}
|
||||||
|
fclose($file['stream']);
|
||||||
}
|
}
|
||||||
fclose($file['stream']);
|
|
||||||
$tmpfs->remove($uniqid);
|
$tmpfs->remove($uniqid);
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user