I'm trying to send a picture to a server I've made, now the problem is that the following curl code from terminal:
curl -X POST -F 'file=@path' -F 'delete_image=yes' url
where path is the absolute path of the image and url is url of the server
The problem is this code (that should be the exact tranlation in python is not working and it's returning an error 400 "bad request"
files = [
('file', open('/Users/viewermac_1/Desktop/Testbed_Web/test.png','rb')),
('delete_image', 'yes'),
]
test = requests.post(url, files=files)
Update: Putting delete_image as data works, but I'm not receiving anything back from the server (I'm supposed to receive a link)