diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2018-01-12 19:12:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 19:12:31 +0000 |
commit | 0fc2362d37b029eeb7f171a46b3918afa33ee0b0 (patch) | |
tree | e98bf4d1bcde3194c2e92863113b1194ffaacd86 /synapse/rest/media | |
parent | Merge pull request #2774 from matrix-org/erikj/synctl (diff) | |
parent | Reinstate media download on thumbnail request (diff) | |
download | synapse-0fc2362d37b029eeb7f171a46b3918afa33ee0b0.tar.xz |
Merge pull request #2777 from matrix-org/rav/fix_remote_thumbnails
Reinstate media download on thumbnail request
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/thumbnail_resource.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/rest/media/v1/thumbnail_resource.py b/synapse/rest/media/v1/thumbnail_resource.py index 70dbf7f5c9..53e48aba22 100644 --- a/synapse/rest/media/v1/thumbnail_resource.py +++ b/synapse/rest/media/v1/thumbnail_resource.py @@ -198,6 +198,11 @@ class ThumbnailResource(Resource): @defer.inlineCallbacks def _respond_remote_thumbnail(self, request, server_name, media_id, width, height, method, m_type): + # TODO: Don't download the whole remote file + # We should proxy the thumbnail from the remote server instead of + # downloading the remote file and generating our own thumbnails. + yield self.media_repo.get_remote_media(server_name, media_id) + thumbnail_infos = yield self.store.get_remote_media_thumbnails( server_name, media_id, ) |