add size var to controller file

Add MAX_SIZE_LIMIT to control image and video size limit to read from env file
staging
Lumb 2019-06-20 09:47:01 +00:00 committed by Gitea
parent 6181c72ff5
commit 2597f31daf
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ class MediaAttachment < ApplicationRecord
},
}.freeze
SIZE_LIMIT = 66.megabytes
SIZE_LIMIT = (ENV['MAX_SIZE_LIMIT'] || 66.megabytes).to_i.megabytes
GIF_LIMIT = ENV.fetch('MAX_GIF_SIZE', 333).to_i.kilobytes
belongs_to :account, inverse_of: :media_attachments, optional: true