Last Updated: February 25, 2016
· thesmartnik

Multiple file upload with postgres and arrierwave

Here is the quick way to store multiple images in a column.

First, In a Model of your choice

mount_uploaders :images, ImageUploader

After that, create an array column in a desired table

add_column :items, :images, :string, array: true

Then in a View add button for multiupload

= f.file_field :images, multiple: true

Аnd in a Controller you need to get images from params and save them

@item.images = params['item']['images']