zulip/zerver/lib/upload
Alex Vandiver 9a1f78db22 thumbnail: Support checking for images from streaming sources.
We may not always have trivial access to all of the bytes of the
uploaded file -- for instance, if the file was uploaded previously, or
by some other process.  Downloading the entire image in order to check
its headers is an inefficient use of time and bandwidth.

Adjust `maybe_thumbnail` and dependencies to potentially take a
`pyvips.Source` which supports streaming data from S3 or disk.  This
allows making the ImageAttachment row, if deemed appropriate, based on
only a few KB of data, and not the entire image.
2024-09-17 12:51:30 -07:00
..
__init__.py thumbnail: Support checking for images from streaming sources. 2024-09-17 12:51:30 -07:00
base.py thumbnail: Support checking for images from streaming sources. 2024-09-17 12:51:30 -07:00
local.py thumbnail: Support checking for images from streaming sources. 2024-09-17 12:51:30 -07:00
s3.py thumbnail: Support checking for images from streaming sources. 2024-09-17 12:51:30 -07:00