fix: increase media size limit
This commit is contained in:
parent
e0302b3864
commit
1e64472343
@ -233,7 +233,7 @@ class Request
|
||||
contents
|
||||
end
|
||||
|
||||
def body_with_limit(limit = 1.megabyte)
|
||||
def body_with_limit(limit = 30.megabyte)
|
||||
require_limit_not_exceeded!(limit)
|
||||
|
||||
contents = truncated_body(limit)
|
||||
|
@ -72,9 +72,9 @@ class Account < ApplicationRecord
|
||||
MENTION_RE = %r{(?<![=/[:word:]])@((#{USERNAME_RE})(?:@[[:word:].-]+[[:word:]]+)?)}
|
||||
URL_PREFIX_RE = %r{\Ahttp(s?)://[^/]+}
|
||||
USERNAME_ONLY_RE = /\A#{USERNAME_RE}\z/i
|
||||
USERNAME_LENGTH_LIMIT = 30
|
||||
USERNAME_LENGTH_LIMIT = 72
|
||||
DISPLAY_NAME_LENGTH_LIMIT = 30
|
||||
NOTE_LENGTH_LIMIT = 500
|
||||
NOTE_LENGTH_LIMIT = 4_096
|
||||
|
||||
AUTOMATED_ACTOR_TYPES = %w(Application Service).freeze
|
||||
|
||||
|
@ -4,7 +4,7 @@ module Account::Avatar
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
IMAGE_MIME_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].freeze
|
||||
LIMIT = 2.megabytes
|
||||
LIMIT = 200.megabytes
|
||||
|
||||
class_methods do
|
||||
def avatar_styles(file)
|
||||
|
@ -4,7 +4,7 @@ module Account::Header
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
IMAGE_MIME_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].freeze
|
||||
LIMIT = 2.megabytes
|
||||
LIMIT = 200.megabytes
|
||||
MAX_PIXELS = 750_000 # 1500x500px
|
||||
|
||||
class_methods do
|
||||
|
@ -24,7 +24,7 @@
|
||||
class CustomEmoji < ApplicationRecord
|
||||
include Attachmentable
|
||||
|
||||
LIMIT = 256.kilobytes
|
||||
LIMIT = 30.megabytes
|
||||
MINIMUM_SHORTCODE_SIZE = 2
|
||||
|
||||
SHORTCODE_RE_FRAGMENT = '[a-zA-Z0-9_]{2,}'
|
||||
|
@ -39,8 +39,8 @@ class MediaAttachment < ApplicationRecord
|
||||
|
||||
MAX_DESCRIPTION_LENGTH = 1_500
|
||||
|
||||
IMAGE_LIMIT = 16.megabytes
|
||||
VIDEO_LIMIT = 99.megabytes
|
||||
IMAGE_LIMIT = 500.megabytes
|
||||
VIDEO_LIMIT = 500.megabytes
|
||||
|
||||
MAX_VIDEO_MATRIX_LIMIT = 8_294_400 # 3840x2160px
|
||||
MAX_VIDEO_FRAME_RATE = 120
|
||||
|
@ -24,7 +24,7 @@ class PreviewCardProvider < ApplicationRecord
|
||||
include Reviewable
|
||||
|
||||
ICON_MIME_TYPES = %w(image/x-icon image/vnd.microsoft.icon image/png).freeze
|
||||
LIMIT = 1.megabyte
|
||||
LIMIT = 50.megabyte
|
||||
|
||||
validates :domain, presence: true, uniqueness: true, domain: true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user