%= javascript_include_tag 'ajax_pull/prototype-1_5_1.js' %> <%= javascript_include_tag 'ajax_pull/ajax_pull.js' %> <%= javascript_include_tag 'ajax_pull/upload_progress.js' %>
<% upid = "#{Time.now.to_i}.#{rand}" act = { :action => 'pull', :upload_id => upid } opt = { :multipart => true, :target => 'upload-target', :onsubmit => "UploadProgress.begin('#{upid}')" } -%> <% if flash[:notice] %>This is a demo of upr in action with Ajax.Pull. It only uses a single, streaming AJAX request instead of pulling. It is based on mongrel_streaming_upload_progress
This is different from the polling mongrel_upload_progress-compatible version and also different from the polling jQuery+nginx/lighttpd-compatible version
<%= link_to "#{upid} (single)", :action => 'status', :upload_id => upid %>
<%= link_to "#{upid} (stream)", "/progress?long&upload_id=#{upid}" %>
<% form_tag(act, opt) do %><%= file_field_tag :data %>
<%= submit_tag :Upload %>
<% end %>Below is the results div
Below is the progress bar div
Below is the debug list