Skip to content

Commit

Permalink
fix: allow to upload img
Browse files Browse the repository at this point in the history
  • Loading branch information
xingwanying committed Jan 17, 2025
1 parent c059aea commit 8ae6bc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/aws/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
responses={404: {"description": "Not found"}},
)


@router.post("/upload")
async def upload_image(
file: UploadFile = File(...),
title: str = Form(None),
description: str = Form(None),
s3_client=Depends(get_s3_client),
user: Annotated[User | None, Depends(get_user)] = None,
):

):

metadata = ImageMetaData(title=title, description=description)
result = upload_image_to_s3(file, metadata, s3_client)
return {"status": "success", "data": result}

0 comments on commit 8ae6bc3

Please sign in to comment.