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.
This commit is contained in:
evazion
2022-10-27 02:09:53 -05:00
parent a9d586e93a
commit e09f990a60

View File

@@ -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).