diff --git a/app/api/v1/api.py b/app/api/v1/api.py index 550f0ad..06b6e81 100644 --- a/app/api/v1/api.py +++ b/app/api/v1/api.py @@ -21,7 +21,7 @@ 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']), + result = rpc.storage.upload(file_name='avatar_' + str(session['user_id']+f'_{f.filename}'), file_binary=f.read(), bucket='bodyrecord', folder='avatar',