Skip to content

Can't change filename when send document after upgrading to v11.1.0 #1227

@ghost

Description

Steps to reproduce

  1. Generate a pickle file "test" (I didn't test other common files yet)

  2. Send this file to user

bot.send_document(chat_id=user_chat_id, document=open('./test', 'rb'), filename="test")

or

bot.send_document(chat_id=user_chat_id, document=open('./test', 'rb'))

Expected behaviour

User will receive a file named test

Actual behaviour

User received a file named application.octet-stream

Configuration

Operating System:

Debian (Server, where I first found this issue)

Ubuntu(Local, I test on v10.1.0, everything is fine, so I upgrade to v11.1.0, then I have the same issue as Debian Server)

Version of Python, python-telegram-bot & dependencies:

$ python -m telegram

My Local Ubuntu After Upgrade:
python-telegram-bot 11.1.0
certifi 2018.08.24
future 0.16.0
Python 3.6.6 (default, Sep 12 2018, 18:26:19) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]

The pictures shows results of python-telegram-bot v10.1.0 (the first one) and v11.1.0 (the second one) :

screenshot from 2018-09-29 14-16-06

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions