filestack/filestack-rails

multiple upload support

Closed this issue · 1 comments

How can I upload multiple photos?

I'm using the maxFiles option which allows me to upload multiple files to filestack servers.

<%= form.filestack_field :photos, 'Upload',  pickerOptions: { accept: ["image/*"], maxFiles: 6 } %>

I'm expecting uploading 2 photos to give me a url to grab both photos from.

<input id="mymodel_photos" style="display:none" type="text" name="mymodel[photos]">
$('#mymodel_photos').val();

returns a just the first file url like https://cdn.filestackcontent.com/IjTo4OxQvi7dwepWfjCH

inspecting params doesn't show any other fields.

<ActionController::Parameters {
  "mymodel"=>{
    "photos"=>"https://cdn.filestackcontent.com/IjTo4OxQvi7dwepWfjCH",
  }, "commit"=>"Create Mymodel",
} permitted: false>

@zachlevy Sorry for the delay. I've updated the library (5.4.0) and I've added a support for uploading multiple files. Now, you are able to grab all urls of uploaded files. Let me know if that works for you as you expected. If you need anything else, ping me.