summary refs log tree commit diff
path: root/synapse/rest/media/v1/filepath.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-06-29 14:57:59 +0100
committerErik Johnston <erik@matrix.org>2016-06-29 14:57:59 +0100
commita70688445dd7a9fa41a55a642fb9a394f291ae45 (patch)
tree780be0bce7d1f48decb341bd665237435b992bda /synapse/rest/media/v1/filepath.py
parentTrack approximate last access time for remote media (diff)
downloadsynapse-a70688445dd7a9fa41a55a642fb9a394f291ae45.tar.xz
Implement purge_media_cache admin API
Diffstat (limited to 'synapse/rest/media/v1/filepath.py')
-rw-r--r--synapse/rest/media/v1/filepath.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/rest/media/v1/filepath.py b/synapse/rest/media/v1/filepath.py
index 422ab86fb3..0137458f71 100644
--- a/synapse/rest/media/v1/filepath.py
+++ b/synapse/rest/media/v1/filepath.py
@@ -65,3 +65,9 @@ class MediaFilePaths(object):
             file_id[0:2], file_id[2:4], file_id[4:],
             file_name
         )
+
+    def remote_media_thumbnail_dir(self, server_name, file_id):
+        return os.path.join(
+            self.base_path, "remote_thumbnail", server_name,
+            file_id[0:2], file_id[2:4], file_id[4:],
+        )