diff options
author | Lumb <lumb@git.multiple-creature.party> | 2019-06-20 09:47:01 +0000 |
---|---|---|
committer | Gitea <gitea@fake.local> | 2019-07-17 07:08:14 +0000 |
commit | 2597f31daf08dbc27f472e8117a900616b8da794 (patch) | |
tree | 735f9703fc9824f94bcfbfd9c2ff138a3a6cc988 /app | |
parent | 6181c72ff51134a34c3d4e8e43d22ba185769b02 (diff) |
add size var to controller file
Add MAX_SIZE_LIMIT to control image and video size limit to read from env file
Diffstat (limited to 'app')
-rw-r--r-- | app/models/media_attachment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 5efff8798..c8290384b 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -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 |