from flask import requestfrom werkzeug.utils import secure_filename text_list = request.form.getlist("testtext[]") files_list = request.files.getlist('testfile[]') print(text_list) for file in files_list: filename = secure_filename(file.filename) #过滤filename中的 ../ file.save(os.path.join('/tmp/upload_dir/', filename))