<%= semantic_form_for [@gallery, @foto], :remote=>true, :html => { :multipart => true, :id => "fileupload" } do |f| %>
Add files... <%= f.file_field :datei, :multiple=>true %> <%= f.input :gallery %>

<% end %>