]> cat aescling's git repositories - mastodon.git/commitdiff
Change custom emoji file size limit from 50 KB to 256 KB (#18788)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 9 Jul 2022 20:07:17 +0000 (22:07 +0200)
committeraescling <aescling+gitlab@cat.family>
Mon, 5 Sep 2022 04:27:55 +0000 (00:27 -0400)
app/models/custom_emoji.rb

index 196ae02974c45ba0da5d618ac0c4a2bcaba063b7..c89bf0586d5b88bd88c1117882efa0b2927ea823 100644 (file)
@@ -23,8 +23,8 @@
 class CustomEmoji < ApplicationRecord
   include Attachmentable
 
-  LOCAL_LIMIT = (ENV['MAX_EMOJI_SIZE'] || 50.kilobytes).to_i
-  LIMIT       = [LOCAL_LIMIT, (ENV['MAX_REMOTE_EMOJI_SIZE'] || 200.kilobytes).to_i].max
+  LOCAL_LIMIT = (ENV['MAX_EMOJI_SIZE'] || 256.kilobytes).to_i
+  LIMIT       = [LOCAL_LIMIT, (ENV['MAX_REMOTE_EMOJI_SIZE'] || 256.kilobytes).to_i].max
 
   SHORTCODE_RE_FRAGMENT = '[a-zA-Z0-9_]{2,}'