mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Fix files downloaded with no file name
This commit is contained in:
parent
92625795ef
commit
684aef3ded
@ -849,7 +849,9 @@ class Client(Methods, BaseClient):
|
|||||||
|
|
||||||
media_type_str = Client.MEDIA_TYPE_ID[data.media_type]
|
media_type_str = Client.MEDIA_TYPE_ID[data.media_type]
|
||||||
|
|
||||||
if not data.file_name:
|
file_name = file_name or data.file_name
|
||||||
|
|
||||||
|
if not file_name:
|
||||||
guessed_extension = self.guess_extension(data.mime_type)
|
guessed_extension = self.guess_extension(data.mime_type)
|
||||||
|
|
||||||
if data.media_type in (0, 1, 2, 14):
|
if data.media_type in (0, 1, 2, 14):
|
||||||
|
Loading…
Reference in New Issue
Block a user