I have a issue when posting a file to a server developed by python flask, but always failed with a key error that the key "file" cannot found in request. My question is how to add the key "file" in web post file method?
here is the blocks:
If I'm not mistaken, there are extensions out there that can encode images in base64. You may consider using such a method to "stringify" your image before POSTing it as text.
Many thanks for the suggestions. I resolved this issue by updating the python server code. use "request.data" to replace with "request.files['file']", after that, key is not required when posting any more.