sendfile

How to send some files with telegram bot in python

How to send some files with telegram bot in python Question: I’m trying to upload the outcomes of my code (they are images) in a group with a Telegram bot. I’ve tried: import requests import numpy as np paths=np.array([]) for z in range(8): paths=np.append(paths,str(f"path\{z}.jpg")) url="https://api.telegram.org/bot<<my-bot-http-token>>/senddocument?chat_id=<<chat-id>>" for path in paths: files={‘document’:open(path,’rb’)} resp=requests.post(url,files=files) It works but it …

Total answers: 1

flask send_files() doenst open download tab

flask send_files() doenst open download tab Question: i created a little web app that allows to upload and download files (pdf,txt,docx) to a sqlite3 database. I use flask as backend framework. When i hit the download button the download route gets called and everything seems fine but the download tab of the browser is not …

Total answers: 1