HTML
<!DOCTYPE html>
<html lang="en">
<body>
<form method="POST" action="">
<input type="hidden" name="pode" value="1"/>
<input type="file" name="arquivo"/><br><br>
<input type="submit"/>
</form>
</body>
</html>
Python
@app.route('/', methods=['POST'])
def index():
a = request.form['pode']
if a:
arquivo = request.files['arquivo']
arquivo.save(arquivo.filename)
return render_template('indexfile.html')
Erro
Method Not Allowed
The method is not allowed for the requested URL.