Open thugbobby opened 4 years ago
Hello. I want to post some files to remote server.But I have not found how to post. In python, I can post file like this:
import requests payload = {} files = [ ('uploads2', open('/D:/cat.png','rb')), ] headers= {} response = requests.request("POST", url, headers=headers, data = payload, files = files) print(response.text.encode('utf8'))
but in micropython, what should I do? the urequests doesn`t have parameter files.
Thanks for your help!
Look here https://github.com/jono-allen/MQTT-Cam/blob/master/uploader.py
Hello. I want to post some files to remote server.But I have not found how to post. In python, I can post file like this:
but in micropython, what should I do? the urequests doesn`t have parameter files.
Thanks for your help!