import requests
url = 'https://www.w3schools.com/python/demopage.php'
myfiles = {'file': open('myfirstreact.png' ,'rb')}
x = requests.post(url, files = myfiles)
#print the response text (the content of the requested file):
print(x.text)