Use basename instead abspath for filename attribute (#294)

This commit is contained in:
Lonami Exo 2017-10-06 21:48:53 +02:00
parent 6d877549cb
commit a17def8026

View File

@ -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
] ]