BadRequestKeyError: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
this error occurs because of using "request.form['input_name']"
when it's a file you have to "request.files['input_name']"
the same happend with me but solved with this hope this helps you.