validations for active_storage made easy
with https://github.com/igorkasyanchuk/active_storage_validations you can do:
validates :avatar, attached: true, content_type: ['image/png', 'image/jpg', 'image/jpeg'], size: { less_than: 500.kilobytes }
please try it! works with local files.
Post a comment