diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2018-01-19 18:57:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-19 18:57:15 +0000 |
commit | b0d9e633ee060b7a82b85f92607ead41639c60b7 (patch) | |
tree | 2937b93251e046d0a972f0e5dea9be958884a239 /synapse/rest/media | |
parent | Fix storage provider bug introduced when renamed to store_local (diff) | |
parent | Use the right path for url_preview thumbnails (diff) | |
download | synapse-b0d9e633ee060b7a82b85f92607ead41639c60b7.tar.xz |
Merge pull request #2814 from matrix-org/rav/fix_urlcache_thumbs
Use the right path for url_preview thumbnails
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/media_storage.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/rest/media/v1/media_storage.py b/synapse/rest/media/v1/media_storage.py index 001e84578e..041ae396cd 100644 --- a/synapse/rest/media/v1/media_storage.py +++ b/synapse/rest/media/v1/media_storage.py @@ -164,6 +164,14 @@ class MediaStorage(object): str """ if file_info.url_cache: + if file_info.thumbnail: + return self.filepaths.url_cache_thumbnail_rel( + media_id=file_info.file_id, + width=file_info.thumbnail_width, + height=file_info.thumbnail_height, + content_type=file_info.thumbnail_type, + method=file_info.thumbnail_method, + ) return self.filepaths.url_cache_filepath_rel(file_info.file_id) if file_info.server_name: |