Do it like => validates :photos, attached: true, content_type: ['image/p...
A demo drag and drop image upldate Ruby on Rails app using Stimulus.js, ...