feat: add logic of avatar image uploading 2
continuous-integration/drone/push Build is passing Details

This commit is contained in:
BryantHe 2023-08-16 14:25:51 +08:00
parent be587a216e
commit 92d0e2a3cb
1 changed files with 2 additions and 2 deletions

View File

@ -18,8 +18,8 @@ api = APIBlueprint('api', __name__)
@api.doc(summary='上传图片', description='上传图片') @api.doc(summary='上传图片', description='上传图片')
@api.input(ImageIn, location='files') @api.input(ImageIn, location='files')
@login_required @login_required
def wechat_login(files): def wechat_login(files_data):
f = files['image'] f = files_data['image']
try: try:
result = rpc.storage.upload(file_name='avatar_' + str(session['user_id']), result = rpc.storage.upload(file_name='avatar_' + str(session['user_id']),
file_binary=f.stream, file_binary=f.stream,