mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
upload: Rename .source to .vips_source.
This commit is contained in:
committed by
Tim Abbott
parent
28cb68117f
commit
183da665ac
@@ -279,9 +279,12 @@ class S3UploadBackend(ZulipUploadBackend):
|
||||
def s3_read(streamingbody: StreamingBody, size: int) -> bytes:
|
||||
return streamingbody.read(amt=size)
|
||||
|
||||
source: pyvips.Source = pyvips.SourceCustom()
|
||||
source.on_read(partial(s3_read, metadata["Body"]))
|
||||
return StreamingSourceWithSize(size=metadata["ContentLength"], source=source)
|
||||
vips_source: pyvips.Source = pyvips.SourceCustom()
|
||||
vips_source.on_read(partial(s3_read, metadata["Body"]))
|
||||
return StreamingSourceWithSize(
|
||||
size=metadata["ContentLength"],
|
||||
vips_source=vips_source,
|
||||
)
|
||||
|
||||
@override
|
||||
def delete_message_attachment(self, path_id: str) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user