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