From d989a617f46d3ed26f1dc3b9d445a4a2909beadb Mon Sep 17 00:00:00 2001 From: BryantHe Date: Wed, 16 Aug 2023 15:36:39 +0800 Subject: [PATCH] fix: upload api 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 06b6e81..dbcd19f 100644 --- a/app/api/v1/api.py +++ b/app/api/v1/api.py @@ -21,9 +21,9 @@ api = APIBlueprint('api', __name__) def wechat_login(files_data): f = files_data['image'] try: - result = rpc.storage.upload(file_name='avatar_' + str(session['user_id']+f'_{f.filename}'), + result = rpc.storage.upload(file_name=str(session['user_id']+f'_{f.filename}'), file_binary=f.read(), - bucket='bodyrecord', + bucket='', folder='avatar', app='bodyrecord') except Exception as e: