diff --git a/telethon/utils.py b/telethon/utils.py index f7509227..482ab1d4 100644 --- a/telethon/utils.py +++ b/telethon/utils.py @@ -678,7 +678,8 @@ def _get_extension(file): # Note: ``file.name`` works for :tl:`InputFile` and some `IOBase` return _get_extension(file.name) else: - return '' + # Maybe it's a Telegram media + return get_extension(file) def is_image(file):