mirror of
https://github.com/element-hq/synapse
synced 2024-08-17 07:00:53 +00:00
Merge pull request #2777 from matrix-org/rav/fix_remote_thumbnails
Reinstate media download on thumbnail request
This commit is contained in:
commit
0fc2362d37
1 changed files with 5 additions and 0 deletions
|
@ -198,6 +198,11 @@ class ThumbnailResource(Resource):
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _respond_remote_thumbnail(self, request, server_name, media_id, width,
|
def _respond_remote_thumbnail(self, request, server_name, media_id, width,
|
||||||
height, method, m_type):
|
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(
|
thumbnail_infos = yield self.store.get_remote_media_thumbnails(
|
||||||
server_name, media_id,
|
server_name, media_id,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue