1
votes

I am having problems enabling selection of multiple images in implementing Carrierwave multiple images. When I click on the upload button in the new view, I just get the file selection window for a single file and can only select a single file.

In the input form, I have:

<%= simple_form_for @car do |f| %>
...
 <%= f.file_field :pictures, multiple: true %>
...

In the Car model, I have:

mount_uploader :pictures, PictureUploader 
serialize :pictures, JSON 

In the cars controller, I have:

params.require(:car).permit(:name, :make, :year, :color, :seats, 
:location, :transmission, :price, :photo, :photo_cache, {pictures: []})

I have a pictures column in the Cars table. I have include cloudinary::Carrierwave in PictureUploader.

Is there anything I'm missing?

1

1 Answers

0
votes

At this time multiple image uploads are not supported with Cloudinary’s GEM and Carrierwave integration. However it is on Cloudinary’s road map of implementations. As a workaround for the time being feel free to reference this sample project for multiple uploads using Cloudinary’s GEM and Carrierwave: https://github.com/taragano/Cloudinary_multiple_uploads