From 92d0e2a3cbb67d4f7141cf58f996cd808145c14e Mon Sep 17 00:00:00 2001 From: BryantHe Date: Wed, 16 Aug 2023 14:25:51 +0800 Subject: [PATCH] feat: add logic of avatar image uploading 2 --- app/api/v1/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/v1/api.py b/app/api/v1/api.py index aedddb5..da104ac 100644 --- a/app/api/v1/api.py +++ b/app/api/v1/api.py @@ -18,8 +18,8 @@ api = APIBlueprint('api', __name__) @api.doc(summary='上传图片', description='上传图片') @api.input(ImageIn, location='files') @login_required -def wechat_login(files): - f = files['image'] +def wechat_login(files_data): + f = files_data['image'] try: result = rpc.storage.upload(file_name='avatar_' + str(session['user_id']), file_binary=f.stream,