Skip to content

Commit

Permalink
fix: allow to upload img (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai authored Jan 17, 2025
2 parents c059aea + 8ae6bc3 commit 19d7ecd
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 19d7ecd

Please sign in to comment.