3 <!-- http://rubyforge.org/pipermail/mongrel-users/2007-July/003747.html -->
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
5 <title>streaming upload progress test</title>
6 <%= javascript_include_tag 'ajax_pull/prototype-1_5_1.js' %>
7 <%= javascript_include_tag 'ajax_pull/ajax_pull.js' %>
8 <%= javascript_include_tag 'ajax_pull/upload_progress.js' %>
12 upid = "#{Time.now.to_i}.#{rand}"
13 act = { :action => 'pull', :upload_id => upid }
16 :target => 'upload-target',
17 :onsubmit => "UploadProgress.begin('#{upid}')"
21 <% if flash[:notice] %>
22 <div class="notice"><%= flash[:notice] %></div>
24 <p><%= link_to "#{upid} (single)",
25 :action => 'status', :upload_id => upid %></p>
26 <p><%= link_to "#{upid} (stream)",
27 "/progress?long&upload_id=#{upid}" %></p>
29 <% form_tag(act, opt) do %>
30 <div><p><%= file_field_tag :data %></p></div>
31 <p><%= submit_tag :Upload %></p>
34 <p>Below is the results <code>div</code></p>
35 <div id="results">(nothing)</div>
37 <p>Below is the progress bar <code>div</code></p>
38 <div id="progress-bar"></div>
40 <p>Below is the debug list</p>
43 <iframe id="upload-target" name="upload-target" src="about:blank"></iframe>