gistlib
main.pyimport requests url = 'https://www.example.com/upload' files = {'file': open('example.txt', 'rb')} response = requests.post(url, files=files) print(response.text) 166 chars9 lines
import requests url = 'https://www.example.com/upload' files = {'file': open('example.txt', 'rb')} response = requests.post(url, files=files) print(response.text)
Note: Make sure to replace the URL and file name with your own details.
gistlibby LogSnag