mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-23 01:46:35 +03:00
Use basename instead abspath for filename attribute (#294)
This commit is contained in:
parent
6d877549cb
commit
a17def8026
|
@ -538,7 +538,7 @@ class TelegramClient(TelegramBareClient):
|
||||||
# Take the first element by using [0] since it returns a tuple
|
# Take the first element by using [0] since it returns a tuple
|
||||||
mime_type = guess_type(file)[0]
|
mime_type = guess_type(file)[0]
|
||||||
attributes = [
|
attributes = [
|
||||||
DocumentAttributeFilename(os.path.abspath(file))
|
DocumentAttributeFilename(os.path.basename(file))
|
||||||
# TODO If the input file is an audio, find out:
|
# TODO If the input file is an audio, find out:
|
||||||
# Performer and song title and add DocumentAttributeAudio
|
# Performer and song title and add DocumentAttributeAudio
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user