Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit ca2db5d

Browse files
authored
Increase default max_upload_size from 10M to 50M (#8502)
Signed-off-by: Mateusz Przybyłowicz <[email protected]>
1 parent 1781bbe commit ca2db5d

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

changelog.d/8502.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Increase default upload size limit from 10M to 50M. Contributed by @Akkowicz.

docker/conf/homeserver.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ federation_rc_concurrent: 3
9090

9191
media_store_path: "/data/media"
9292
uploads_path: "/data/uploads"
93-
max_upload_size: "{{ SYNAPSE_MAX_UPLOAD_SIZE or "10M" }}"
93+
max_upload_size: "{{ SYNAPSE_MAX_UPLOAD_SIZE or "50M" }}"
9494
max_image_pixels: "32M"
9595
dynamic_thumbnails: false
9696

docs/reverse_proxy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ server {
5454
proxy_set_header X-Forwarded-For $remote_addr;
5555
# Nginx by default only allows file uploads up to 1M in size
5656
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
57-
client_max_body_size 10M;
57+
client_max_body_size 50M;
5858
}
5959
}
6060
```

docs/sample_config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ media_store_path: "DATADIR/media_store"
893893

894894
# The largest allowed upload size in bytes
895895
#
896-
#max_upload_size: 10M
896+
#max_upload_size: 50M
897897

898898
# Maximum number of pixels that will be thumbnailed
899899
#

synapse/config/repository.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def read_config(self, config, **kwargs):
100100
"media_instance_running_background_jobs",
101101
)
102102

103-
self.max_upload_size = self.parse_size(config.get("max_upload_size", "10M"))
103+
self.max_upload_size = self.parse_size(config.get("max_upload_size", "50M"))
104104
self.max_image_pixels = self.parse_size(config.get("max_image_pixels", "32M"))
105105
self.max_spider_size = self.parse_size(config.get("max_spider_size", "10M"))
106106

@@ -242,7 +242,7 @@ def generate_config_section(self, data_dir_path, **kwargs):
242242
243243
# The largest allowed upload size in bytes
244244
#
245-
#max_upload_size: 10M
245+
#max_upload_size: 50M
246246
247247
# Maximum number of pixels that will be thumbnailed
248248
#

0 commit comments

Comments
 (0)