:javascript $(function() { $("#photo_image").html5_upload({ // WE INSERT ALBUM_ID PARAM HERE url: "/photos?album_id=#{album.id}", sendBoundary: window.FormData || $.browser.mozilla, onStart: function(event, total) { return confirm("You are about to upload " + total + " photos. Are you sure?"); }, onFinish: function(event, total){ $("#add_photo_button .button").html( "Add Photos" ); $("#add_photo_loader").fadeOut(400); pane_toggler_button("photo") }, onStart: function(event, total){ $("#add_photo_pane").fadeOut(400); $("#add_photo_button .button").html( "Uploading Photos" ); $("#add_photo_loader").fadeIn(400); $("#add_photo_button").unbind(); return true; } }); }); %h1 Add photos to %i= album.name = form_for photo, :html => {:multipart => true} do |f| = f.error_messages = f.hidden_field :album_id, :value => album.id = f.file_field :image, :multiple => 'multiple'