How to compress image and then upload it to AWS S3 bucket using FastAPI? – Amazon web services
Here is my code for uploading the image to AWS S3: @app.post("/post_ads") async def create_upload_files(files: list[UploadFile] = File(description="Multiple files as UploadFile")): main_image_list = [] for file in files: s3 = boto3.resource( 's3', aws_access_key_id = aws_access_key_id, aws_secret_access_key = aws_secret_access_key ) bucket…