From e09f990a60acb81af55f8e3285f7ae7c4fab7c44 Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 27 Oct 2022 02:09:53 -0500 Subject: [PATCH] uploads: raise default max upload limit to 100MB. The previous upload limit was 50MB, to discourage uploading excessively large images. But for videos this can be too low, especially for long videos at high resolutions. The upload limit really should be around 200MB to allow for a ~10Mbps bitrate at the maximum upload length of 2:20. However, the maximum upload limit under Cloudflare is 100MB, so if we raised the upload limit beyond this, it would only work when uploading a file from a source URL, not from your computer. To get around this, we would have to put the upload endpoint outside of Cloudflare, or allow uploading files in chunks. --- config/danbooru_default_config.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index 5fc898f04..f73b760b5 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -175,10 +175,9 @@ module Danbooru 40 end - # Maximum size of an upload. If you change this, you must also change - # `client_max_body_size` in your nginx.conf. + # Maximum size of an upload. If you change this, you must also change `client_max_body_size` in your nginx.conf. def max_file_size - 50.megabytes + 100.megabytes end # Maximum resolution (width * height) of an upload. Default: 441 megapixels (21000x21000 pixels).