with open('test.jpg', 'rb') as payload:
    files = {'photo': payload, 'Content-Type': 'image/jpeg'}
r = requests.put('http://localhost:8000/sendfiles/1/', verify=False, files=
    files)
print(r)
Upload picture to Django from Python script