Fixes to file sizes
This commit is contained in:
parent
29c0542d80
commit
e191bdc59d
@ -35,7 +35,7 @@ trait Files
|
|||||||
\danog\MadelineProto\Logger::log(['Upload status: '.$percent.'%'], \danog\MadelineProto\Logger::NOTICE);
|
\danog\MadelineProto\Logger::log(['Upload status: '.$percent.'%'], \danog\MadelineProto\Logger::NOTICE);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
$part_size = 128 * 1024;
|
$part_size = 512 * 1024;
|
||||||
$part_total_num = (int) ceil($file_size / $part_size);
|
$part_total_num = (int) ceil($file_size / $part_size);
|
||||||
$part_num = 0;
|
$part_num = 0;
|
||||||
$method = $file_size > 10 * 1024 * 1024 ? 'upload.saveBigFilePart' : 'upload.saveFilePart';
|
$method = $file_size > 10 * 1024 * 1024 ? 'upload.saveBigFilePart' : 'upload.saveFilePart';
|
||||||
@ -263,7 +263,7 @@ trait Files
|
|||||||
$end = $message_media['size'];
|
$end = $message_media['size'];
|
||||||
}
|
}
|
||||||
$size = $end - $offset;
|
$size = $end - $offset;
|
||||||
$part_size = 512 * 1024;
|
$part_size = 128 * 1024;
|
||||||
$percent = 0;
|
$percent = 0;
|
||||||
$datacenter = isset($message_media['InputFileLocation']['dc_id']) ? $message_media['InputFileLocation']['dc_id'] : $this->datacenter->curdc;
|
$datacenter = isset($message_media['InputFileLocation']['dc_id']) ? $message_media['InputFileLocation']['dc_id'] : $this->datacenter->curdc;
|
||||||
if (isset($message_media['key'])) {
|
if (isset($message_media['key'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user