I’d expect that this would just work:
required(:image).maybe(:file?, max_file_size?: 2.megabytes, allowable_file_type?: ['image/jpeg', 'image/jpg', 'image/png', 'image/gif'])
I’d expect that this would just work:
required(:image).maybe(:file?, max_file_size?: 2.megabytes, allowable_file_type?: ['image/jpeg', 'image/jpg', 'image/png', 'image/gif'])