mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
thumbnail: Backfill ImageAttachment rows.
We previously used the file extension to determine if we should
attempt to inline an image. After b42863be4b
, we rely on the
existence of ImageAttachment rows to determine if something is an
image which can be viewed inline. This means that messages
containing files uploaded before that commit, when (re-)rendered, will
be judged as not having inline'able images.
Backfill all of the ImageAttachment rows for image-like file
extensions. We are careful to only download the bytes that we need in
the image headers, to minimize bandwidth from S3 in the event that the
S3 backend is in use. We do _not_ produce thumbnails for the images
during this migration; see the subsequent commit.
Because this migration will be backported to 9.x, it is marked as only
depending on the last migration in `9.x`, with a subsequent merge
migration into the tip of `main`.
This commit is contained in:
committed by
Tim Abbott
parent
d796deddf8
commit
df91cdf333
@@ -54,6 +54,7 @@ rules:
|
||||
|
||||
- id: dont-import-models-in-migrations
|
||||
patterns:
|
||||
- pattern-not: from zerver.lib.partial import partial
|
||||
- pattern-not: from zerver.lib.mime_types import $X
|
||||
- pattern-not: from zerver.lib.redis_utils import get_redis_client
|
||||
- pattern-not: from zerver.lib.utils import generate_api_key
|
||||
|
Reference in New Issue
Block a user