服务器程序接受客户端上传的文件名称 fileName ,然后获取文件数据保存 import flask app=flask.Flask(__name__) @app.route("/upload",methods=["POST"]) def uploadFile(): msg="" try: if "fileName" in flask.request.values: fileName = flask.request.values.get("fileName") __________________________________ fobj=open("upload "+fileName,"wb") fobj.write(data) fobj.close() msg="OK" else: msg=" 没有按要求上传文件 " except Exception as err: print(err) msg=str(err) return msg if __name__=="__main__": app.run() 缺失的语句是