From: Eugen Rochko Date: Sat, 9 Jul 2022 20:07:17 +0000 (+0200) Subject: Change custom emoji file size limit from 50 KB to 256 KB (#18788) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=cc901d19fc9ca1fa7452d02bba3a58bc4fa5c51a;p=mastodon.git Change custom emoji file size limit from 50 KB to 256 KB (#18788) --- diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb index 196ae0297..c89bf0586 100644 --- a/app/models/custom_emoji.rb +++ b/app/models/custom_emoji.rb @@ -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,}'