mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Fix file extension
This commit is contained in:
parent
834fff88da
commit
64ebf979e5
1 changed files with 2 additions and 1 deletions
|
|
@ -311,7 +311,8 @@ class Client:
|
|||
if not file_name:
|
||||
file_name = "doc_{}{}".format(
|
||||
datetime.fromtimestamp(document.date).strftime("%Y-%m-%d_%H-%M-%S"),
|
||||
mimetypes.guess_extension(document.mime_type) or ".unknown"
|
||||
".txt" if document.mime_type == "text/plain" else
|
||||
mimetypes.guess_extension(document.mime_type) if document.mime_type else ".unknown"
|
||||
)
|
||||
|
||||
for i in document.attributes:
|
||||
|
|
|
|||
Loading…
Reference in a new issue