2- Method from server side that is handeling post request will recieve image by using code given below
import flask
import werkzeug
app = flask.Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def handle_request():
# To retrieve image that is sent from android app and is placed inside image folder
imagefile = flask.request.files['image']
# to retrieve image name
filename = werkzeug.utils.secure_filename(imagefile.filename)
print("\nReceived image File name : " + imagefile.filename)
imagefile.save(filename)
return "Image Uploaded Successfully"
app.run(host="0.0.0.0", port=5000, debug=True)