我在通过该sendDocument方法将文件上传到电报时遇到了一个奇怪的问题。我正在用python-telegram-bot用python编写一个机器人。我尝试向用户发送一个 ZIP 文件,将 URL 作为document. 这是网址:http://telegram.someurl.tdl/32487352.zip
bot.send_document(
chat_id,
document=document,
filename=filename,
timeout=60)
Run Code Online (Sandbox Code Playgroud)
据我所知,我的文件遵循 Telegram 给出的规则:http://telegram.someurl.tdl/32487352.zip
http://telegram.someurl.tdl/32487352.zip2.14 MBapplication/zipZIP file这些是标题:
Accept-Ranges ?bytes
Connection ?keep-alive
Content-Length ?2247049
Content-Type ?application/zip
Date ?Sun, 29 Oct 2017 21:15:36 GMT
ETag ?"59f5e6e6-224989"
Last-Modified ?Sun, 29 Oct 2017 14:34:14 GMT
Server ?nginx/1.10.3 (Ubuntu)
Run Code Online (Sandbox Code Playgroud)
该文件由 nginx …