Alex Vandiver
c9d1755a12
delete_realm: Optimize attachment cleanup by batching.
2023-03-02 16:36:19 -08:00
Alex Vandiver
b31a6dc56c
upload: Reorder functions into logical groupings.
2023-03-02 16:36:19 -08:00
Alex Vandiver
04e7621668
upload: Rename upload_message_image_from_request.
...
The table is named Attachment, and not all of them are images.
2023-03-02 16:36:19 -08:00
Alex Vandiver
bd80c048be
upload: Rename delete_message_image to use word "attachment".
...
The table is named Attachment, and not all of them are images.
2023-03-02 16:36:19 -08:00
Alex Vandiver
567d1d54e7
upload: Rename upload_message_file to use word "attachment".
...
For consistency with the table, which is named Attachment.
2023-03-02 16:36:19 -08:00
Alex Vandiver
862e3bb80a
avatars: Use a helper method, rather than use upload_backend directly.
...
Importing `upload_backend` directly means that in testing it must also
be mocked where it is imported, in order to correctly test the right
backend. Since `get_avatar_url` is part of the public
`ZulipUploadBackend` API, add another helper method to call that.
2023-01-09 18:23:58 -05:00
Alex Vandiver
7c0d414aff
uploads: Split out S3 and local file backends into separate files.
...
The uploads file is large, and conceptually the S3 and local-file
backends are separable.
2023-01-09 18:23:58 -05:00