mirror of
https://github.com/filegator/filegator.git
synced 2025-08-04 17:57:30 +02:00
cont
This commit is contained in:
@@ -106,13 +106,13 @@ class DownloadController
|
|||||||
$streamedResponse->setCallback(function () use ($tmpfs, $uniqid) {
|
$streamedResponse->setCallback(function () use ($tmpfs, $uniqid) {
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
$tmp_file = $tmpfs->readStream($uniqid);
|
$file = $tmpfs->readStream($uniqid);
|
||||||
while (! feof($tmp_file['stream'])) {
|
while ($file && ! feof($file['stream'])) {
|
||||||
echo fread($tmp_file['stream'], 1024 * 8);
|
echo fread($file['stream'], 1024 * 8);
|
||||||
ob_flush();
|
ob_flush();
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
fclose($tmp_file['stream']);
|
fclose($file['stream']);
|
||||||
$tmpfs->remove($uniqid);
|
$tmpfs->remove($uniqid);
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user