Django,Flask中的request

request的结构获取

class Upload(Resource):
  def post(self):
    print(curPath)
    print(request.files['file'].__dict__)
    print('--------------------------------------------')
    print(request.files.get('file').__dict__)
    # file = request.files['file']
    # filename = request.files['file'].filename
    # print(filename,request.args)
    # file.save(curPath +'/static/test.txt')
    return {"success": True}
posted @ 2022-06-01 17:09  hanwang~  阅读(37)  评论(0编辑  收藏  举报