运行此代码时,我总是得到请求的URL中不允许使用Method。
@app.route('/datauploads',methods=['POST'])
def datauploads():
if request.method == 'POST' and 'csv_data' in request.files:
file = request.files['csv_data']
filename = file.filename
return render_template('details.html',filename = filename)