chore: attachment validation fix (#2976)
- Attachment validation was supposed to affect the web widget channel only. But it was validating for all channels
This commit is contained in:
@@ -87,7 +87,7 @@ class Attachment < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def acceptable_file
|
def acceptable_file
|
||||||
should_validate_file?
|
return unless should_validate_file?
|
||||||
|
|
||||||
errors.add(:file, 'is too big') if file.byte_size > 40.megabytes
|
errors.add(:file, 'is too big') if file.byte_size > 40.megabytes
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user