Skip to content

Instantly share code, notes, and snippets.

@ninetwentyfour
Last active December 12, 2015 01:58
Show Gist options
  • Save ninetwentyfour/4695134 to your computer and use it in GitHub Desktop.
Save ninetwentyfour/4695134 to your computer and use it in GitHub Desktop.
Simple Multi-File Uploads With Paperclip
params[:document][:filearrays].each do |file|
@document = Document.new(:document => file)
@document.save
end
<%= form_for Document.new, :url => documents_path, :remote => true, :html => {:multipart => true} do |f| %>
<%= f.file_field :filearrays, :multiple =>:true %>
<%= f.submit "Submit" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment