Reinstate media download on thumbnail request

We need to actually download the remote media when we get a request for a
thumbnail.
pull/2777/head
Richard van der Hoff 2018-01-12 15:38:06 +00:00
parent fefeb0ab0e
commit 21bf87a146
1 changed files with 5 additions and 0 deletions

View File

@ -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,
)