uploads: add limits on max image dimensions.

This commit is contained in:
evazion
2018-03-25 18:05:52 -05:00
parent be0c2cfcfa
commit c0c41dd369
3 changed files with 37 additions and 0 deletions

View File

@@ -179,6 +179,21 @@ module Danbooru
35.megabytes
end
# Maximum resolution (width * height) of an upload. Default: 441 megapixels (21000x21000 pixels).
def max_image_resolution
21000 * 21000
end
# Maximum width of an upload.
def max_image_width
40000
end
# Maximum height of an upload.
def max_image_height
40000
end
def member_comment_time_threshold
1.week.ago
end