mirror of https://github.com/zulip/zulip.git
9a1f78db22
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. |
||
---|---|---|
.. | ||
__init__.py | ||
base.py | ||
local.py | ||
s3.py |