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

Commit

Permalink
Increase default max_upload_size from 10M to 50M (#8502)
Browse files Browse the repository at this point in the history
Signed-off-by: Mateusz Przybyłowicz <uamfhq@gmail.com>
  • Loading branch information
Akkowicz committed Oct 9, 2020
1 parent 1781bbe commit ca2db5d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog.d/8502.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Increase default upload size limit from 10M to 50M. Contributed by @Akkowicz.
2 changes: 1 addition & 1 deletion docker/conf/homeserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ federation_rc_concurrent: 3

media_store_path: "/data/media"
uploads_path: "/data/uploads"
max_upload_size: "{{ SYNAPSE_MAX_UPLOAD_SIZE or "10M" }}"
max_upload_size: "{{ SYNAPSE_MAX_UPLOAD_SIZE or "50M" }}"
max_image_pixels: "32M"
dynamic_thumbnails: false

Expand Down
2 changes: 1 addition & 1 deletion docs/reverse_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ server {
proxy_set_header X-Forwarded-For $remote_addr;
# Nginx by default only allows file uploads up to 1M in size
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
client_max_body_size 10M;
client_max_body_size 50M;
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ media_store_path: "DATADIR/media_store"

# The largest allowed upload size in bytes
#
#max_upload_size: 10M
#max_upload_size: 50M

# Maximum number of pixels that will be thumbnailed
#
Expand Down
4 changes: 2 additions & 2 deletions synapse/config/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def read_config(self, config, **kwargs):
"media_instance_running_background_jobs",
)

self.max_upload_size = self.parse_size(config.get("max_upload_size", "10M"))
self.max_upload_size = self.parse_size(config.get("max_upload_size", "50M"))
self.max_image_pixels = self.parse_size(config.get("max_image_pixels", "32M"))
self.max_spider_size = self.parse_size(config.get("max_spider_size", "10M"))

Expand Down Expand Up @@ -242,7 +242,7 @@ def generate_config_section(self, data_dir_path, **kwargs):
# The largest allowed upload size in bytes
#
#max_upload_size: 10M
#max_upload_size: 50M
# Maximum number of pixels that will be thumbnailed
#
Expand Down

0 comments on commit ca2db5d

Please sign in to comment.