summary refs log tree commit diff
path: root/synapse/config/repository.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-01-24 18:47:27 -0500
committerMatthew Hodgson <matthew@matrix.org>2016-01-24 18:47:27 -0500
commit7dd0c1730a1ea5962a77b9bbb883c1690b25b686 (patch)
tree63e57c1107f7d8b6fd3a6c7d5a7b38811281ee9b /synapse/config/repository.py
parentMerge pull request #523 from matrix-org/dbkr/no_push_unless_notify (diff)
downloadsynapse-7dd0c1730a1ea5962a77b9bbb883c1690b25b686.tar.xz
initial WIP of a tentative preview_url endpoint - incomplete, untested, experimental, etc. just putting it here for safekeeping for now
Diffstat (limited to 'synapse/config/repository.py')
-rw-r--r--synapse/config/repository.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py
index 2fcf872449..33fff5616d 100644
--- a/synapse/config/repository.py
+++ b/synapse/config/repository.py
@@ -53,6 +53,7 @@ class ContentRepositoryConfig(Config):
     def read_config(self, config):
         self.max_upload_size = self.parse_size(config["max_upload_size"])
         self.max_image_pixels = self.parse_size(config["max_image_pixels"])
+        self.max_spider_size = self.parse_size(config["max_spider_size"])
         self.media_store_path = self.ensure_directory(config["media_store_path"])
         self.uploads_path = self.ensure_directory(config["uploads_path"])
         self.dynamic_thumbnails = config["dynamic_thumbnails"]
@@ -73,6 +74,9 @@ class ContentRepositoryConfig(Config):
         # The largest allowed upload size in bytes
         max_upload_size: "10M"
 
+        # The largest allowed URL preview spidering size in bytes
+        max_spider_size: "10M"
+
         # Maximum number of pixels that will be thumbnailed
         max_image_pixels: "32M"
 
@@ -80,7 +84,7 @@ class ContentRepositoryConfig(Config):
         # the resolution requested by the client. If true then whenever
         # a new resolution is requested by the client the server will
         # generate a new thumbnail. If false the server will pick a thumbnail
-        # from a precalcualted list.
+        # from a precalculated list.
         dynamic_thumbnails: false
 
         # List of thumbnail to precalculate when an image is uploaded.