Joined December 2015
·

Anuj

San Francisco
·
·

How you can send the file and the json using

headers = {'content-type': 'multipart/form-data'}
image = open('img.jpg', 'rb')
payload = {'id': self.id} 
files = {'photo': image}    

upload_result = self.client.post("/image/", data=payload, files=files, headers=headers)
print upload_result
print upload_result.content

The issue is request.FILES on the server side is NONE. How to handle this ? I am using locust load testing tool

Achievements
1 Karma
0 Total ProTip Views