I found useful article about uploading image using Active Storage in activeadmin: https://medium.com/@maris.cilitis/using-ruby-on-rails-active-storage-image-uploads-for-active-admin-backed-resources-5638a9ca0b46
But how to upload multiple images in activeadmin with Active Storage the same way?
You just need do some changes
model:
has_many_attached :images
instead of
has_one_attached :image
activeadmin:
permit_params images: []
form do |f|
f.inputs do
f.input :images, as: :file, input_html: { multiple: true }
end
end
and you'll can choose many files to upload
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With