On my Django backend, I deal with images like this:
for file in request.FILES.iteritems():
image = request.FILES["image"]
It is easy to send a post request via java using a byte array.
But how to do a post request using Python?
As in, I've an image url.
I've downloaded the iamge from an url using
r = requests.get('url')
r.content #ImageConent
Now how do I post it such that it is delivered as a byte array?
forloop is not necessary. Just executeimage = request.FILES["image"]without the loop.