mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +03:00
Support Path-like values for thumb in _file_to_media (#1095)
This commit is contained in:
parent
bb5c1f24c6
commit
747caf1652
|
@ -463,6 +463,8 @@ class UploadMethods(ButtonMethods, MessageParseMethods, UserMethods):
|
|||
|
||||
input_kw = {}
|
||||
if thumb:
|
||||
if isinstance(thumb, pathlib.Path):
|
||||
thumb = str(thumb.absolute())
|
||||
input_kw['thumb'] = await self.upload_file(thumb)
|
||||
|
||||
media = types.InputMediaUploadedDocument(
|
||||
|
|
Loading…
Reference in New Issue
Block a user