mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 20:50:22 +03:00
Add support Path-like thumb to _file_to_media
This commit is contained in:
parent
bb5c1f24c6
commit
b4696fc6aa
|
@ -463,6 +463,8 @@ class UploadMethods(ButtonMethods, MessageParseMethods, UserMethods):
|
||||||
|
|
||||||
input_kw = {}
|
input_kw = {}
|
||||||
if thumb:
|
if thumb:
|
||||||
|
if isinstance(thumb, pathlib.Path):
|
||||||
|
thumb = str(thumb.absolute())
|
||||||
input_kw['thumb'] = await self.upload_file(thumb)
|
input_kw['thumb'] = await self.upload_file(thumb)
|
||||||
|
|
||||||
media = types.InputMediaUploadedDocument(
|
media = types.InputMediaUploadedDocument(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user