diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 65f00e1c86..70a671b4a9 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -101,8 +101,8 @@ class MediaAttachment < ApplicationRecord }, }.freeze - IMAGE_LIMIT = 8.megabytes - VIDEO_LIMIT = 40.megabytes + IMAGE_LIMIT = (ENV['MAX_IMAGE_SIZE'] || 8.megabytes).to_i + VIDEO_LIMIT = (ENV['MAX_VIDEO_SIZE'] || 40.megabytes).to_i belongs_to :account, inverse_of: :media_attachments, optional: true belongs_to :status, inverse_of: :media_attachments, optional: true