1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 21:51:34 +01:00

Use getOutputBufferStream

This commit is contained in:
Daniil Gentili 2023-12-14 17:10:47 +01:00
parent 6065782560
commit 7efce84128

View File

@ -59,6 +59,7 @@ use const FILTER_VALIDATE_URL;
use function Amp\async;
use function Amp\ByteStream\buffer;
use function Amp\ByteStream\getOutputBufferStream;
use function Amp\File\exists;
use function Amp\File\getSize;
@ -130,7 +131,7 @@ trait FilesLogic
ob_implicit_flush();
}
[$start, $end] = $result->getServeRange();
$this->downloadToStream($messageMedia, fopen('php://output', 'w'), $cb, $start, $end, $cancellation);
$this->downloadToStream($messageMedia, getOutputBufferStream(), $cb, $start, $end, $cancellation);
}
}
/**