postman
对应的python代码
from flask import Flask, request, jsonify import argparse import json import os from werkzeug.utils import secure_filename
@app.route('/first_rotational_flow/pre_model/update', methods=['POST']) def first_rotational_flow_pre_model_update(): response = dict() print(request.files) f = request.files['file'] f.save(os.path.join(app.config['UPLOAD_FOLDER'], secure_filename(f.filename))) response["msg"] = "成功" response["status"] = "1" print(response) return jsonify(response)