feat: api get_presign_url 2
continuous-integration/drone/push Build is passing Details

This commit is contained in:
BryantHe 2023-08-16 17:21:50 +08:00
parent 95079adc6b
commit a21bd3aef5
2 changed files with 3 additions and 3 deletions

View File

@ -47,13 +47,13 @@ def upload_image(files_data):
@api.doc(summary='获取图片预签名链接', description='获取图片预签名链接')
def get_image_presign_url(query_data):
try:
result = rpc.storage.get_presign_url(query_data['avatar_id'],
presign_url = rpc.storage.get_presign_url(query_data['avatar_id'],
'bodyrecord',
bucket='bodyrecord',
expire_time=query_data.get('expire_time', 3600))
except Exception as e:
raise ImageNotFound(extra_data={'error_docs': str(e)})
return result
return {'image_presign_url': presign_url}
@api.get('/hello')

View File

@ -12,6 +12,6 @@ class ImagePreSignUrlIn(Schema):
class ImagePreSignUrlOut(Schema):
image_url = URL()
image_presign_url = URL()