

from flask import Flask, request, jsonify
app = Flask(__name__)


def get_file(f):
    print(type(f))
    return [f]


@app.route('/search', methods=['POST'])
def search():
    file = request.form.get('file', '')  # 默认值为 'us'
    get_file(f=file)
    jsonify(
        {
            "file": file,
        }
    )


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)