Код: Выделить всё
@upload_router.post('')
async def upload_file(
request: Request,
file: Annotated[UploadFile, File()],
):
await s3_client.upload_file(file.file, f'{unique_filename}_{file.filename}')
Код: Выделить всё
raise HTTPClientError(error=e)
botocore.exceptions.HTTPClientError: An HTTP Client raised an unhandled exception: Only io.IOBase, multidict and (name, file) pairs allowed, use .add_field() for passing more complex parameters, got
Подробнее здесь: https://stackoverflow.com/questions/790 ... s3-storage