summary refs log tree commit diff
path: root/synapse/config/repository.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-12-19 13:40:02 +0000
committerMark Haines <mark.haines@matrix.org>2014-12-19 13:40:02 +0000
commit45a6869cb46ec07c475fca2fee83e4c906a54e94 (patch)
tree9714da089fd65cd5820b8f8353fcd244102448b2 /synapse/config/repository.py
parentMerge branch 'hotfixes-v0.5.4' of github.com:matrix-org/synapse (diff)
parentBump web sdk version to 0.6.0 (diff)
downloadsynapse-45a6869cb46ec07c475fca2fee83e4c906a54e94.tar.xz
Merge branch 'release-v0.6.0' v0.6.0
Diffstat (limited to 'synapse/config/repository.py')
-rw-r--r--synapse/config/repository.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py
index 743bc26474..f1b7b1b74e 100644
--- a/synapse/config/repository.py
+++ b/synapse/config/repository.py
@@ -20,6 +20,8 @@ class ContentRepositoryConfig(Config):
     def __init__(self, args):
         super(ContentRepositoryConfig, self).__init__(args)
         self.max_upload_size = self.parse_size(args.max_upload_size)
+        self.max_image_pixels = self.parse_size(args.max_image_pixels)
+        self.media_store_path = self.ensure_directory(args.media_store_path)
 
     def parse_size(self, string):
         sizes = {"K": 1024, "M": 1024 * 1024}
@@ -37,3 +39,10 @@ class ContentRepositoryConfig(Config):
         db_group.add_argument(
             "--max-upload-size", default="1M"
         )
+        db_group.add_argument(
+            "--media-store-path", default=cls.default_path("media_store")
+        )
+        db_group.add_argument(
+            "--max-image-pixels", default="32M",
+            help="Maximum number of pixels that will be thumbnailed"
+        )