From 4d3d3efcf12656e26e0884c669528074c6395bec Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 11 Jul 2024 01:49:09 +0000 Subject: [PATCH] thumbnail: Newly-thumbnailed avatars are all image/png. --- zerver/migrations/0544_copy_avatar_images.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/zerver/migrations/0544_copy_avatar_images.py b/zerver/migrations/0544_copy_avatar_images.py index c95b95feda..4d5f98eb85 100644 --- a/zerver/migrations/0544_copy_avatar_images.py +++ b/zerver/migrations/0544_copy_avatar_images.py @@ -90,8 +90,7 @@ def thumbnail_s3_avatars(users: QuerySet[Any]) -> None: continue avatar_bucket.Object(new_base + ".png").put( Metadata=metadata, - ContentDisposition=old_data["ContentDisposition"], - ContentType=old_data["ContentType"], + ContentType="image/png", CacheControl="public, max-age=31536000, immutable", Body=small, ) @@ -101,8 +100,7 @@ def thumbnail_s3_avatars(users: QuerySet[Any]) -> None: continue avatar_bucket.Object(new_base + "-medium.png").put( Metadata=metadata, - ContentDisposition=old_data["ContentDisposition"], - ContentType=old_data["ContentType"], + ContentType="image/png", CacheControl="public, max-age=31536000, immutable", Body=medium, )