image = Image.open(request.files["fullimage"])
returns:
IOError: cannot identify image file
and
image = Image.open(request.files["fullimage"].read())
returns:
IOError: [Errno 22] invalid mode ('rb') or filename: ''
What's the right way to do this, please?
This could work.
img = Image.open(request.files['file'].stream)
Maybe it's too late, but hope it would help others who find this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With