1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 19:24:42 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Mahdi
723b0323e3
Merge 83c36563f4 into 642e62551b 2024-11-22 20:55:51 +02:00
642e62551b Add proper exception for uploads of empty files 2024-11-22 18:32:36 +00:00

View File

@ -393,6 +393,9 @@ trait Files
}
await($promises, $cancellation);
await($resPromises, $cancellation);
if ($totalSize === 0) {
throw new AssertionError('You uploaded an empty file!');
}
$time = microtime(true) - $start;
$speed = (int) ($totalSize * 8 / $time) / 1000000;
if (!$size) {