diff --git a/telegram_client_x.py b/telegram_client_x.py index eec2d64..d148136 100644 --- a/telegram_client_x.py +++ b/telegram_client_x.py @@ -202,7 +202,7 @@ class TelegramClientX(TelegramClient): file_size, part_count, part_size) with open(file, 'rb') if isinstance(file, str) else BytesIO(file) as stream: - threads_count = 2 + int((self._upload_threads_count - 2) * float(file_size) / (1024 * 1024 * 389)) + threads_count = 2 + int((self._upload_threads_count - 2) * float(file_size) / (1024 * 1024 * 100)) threads_count = min(threads_count, self._upload_threads_count) threads_count = min(part_count, threads_count) upload_thread = []