Skip to content
Snippets Groups Projects
Commit 21bf87a1 authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Reinstate media download on thumbnail request

We need to actually download the remote media when we get a request for a
thumbnail.
parent fefeb0ab
No related branches found
No related tags found
No related merge requests found
...@@ -198,6 +198,11 @@ class ThumbnailResource(Resource): ...@@ -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,
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment