diff --git a/fastapi_storages/s3.py b/fastapi_storages/s3.py index a9b760f..d8dc064 100644 --- a/fastapi_storages/s3.py +++ b/fastapi_storages/s3.py @@ -111,7 +111,7 @@ def write(self, file: BinaryIO, name: str) -> str: file.seek(0, 0) key = self.get_name(name) - self._bucket.upload_fileobj(file, key, ExtraArgs={"ACL": self.AWS_DEFAULT_ACL}) + self._bucket.upload_fileobj(file, key, ExtraArgs={"ACL": self.AWS_DEFAULT_ACL, "ContentType": "image/png"}) return key def generate_new_filename(self, filename: str) -> str: