Sha256: 3a4042f47b86b57704ae78a2efc3a5124fa717d87b17976cf2a605f747cca5c7
Contents?: true
Size: 1.87 KB
Versions: 2
Compression:
Stored size: 1.87 KB
Contents
<html> <head> <!-- http://rubyforge.org/pipermail/mongrel-users/2007-July/003747.html --> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>streaming upload progress test</title> <%= 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' %> </head> <body> <% 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] %> <div class="notice"><%= flash[:notice] %></div> <% end %> <p> This is a demo of <a href="http://upr.bogomips.org/">upr</a> in action with Ajax.Pull. It only uses a single, streaming AJAX request instead of pulling. It is based on <a href="http://rubyforge.org/pipermail/mongrel-users/2007-July/003747.html" >mongrel_<b>streaming</b>_upload_progress</a> </p> <p> This is different from the polling <a href="/">mongrel_upload_progress-compatible</a> version and also different from the polling <a href="/files/new">jQuery+nginx/lighttpd-compatible</a> version </p> <p><%= link_to "#{upid} (single)", :action => 'status', :upload_id => upid %></p> <p><%= link_to "#{upid} (stream)", "/progress?long&upload_id=#{upid}" %></p> <% form_tag(act, opt) do %> <div><p><%= file_field_tag :data %></p></div> <p><%= submit_tag :Upload %></p> <% end %> <p>Below is the results <code>div</code></p> <div id="results">(nothing)</div> <p>Below is the progress bar <code>div</code></p> <div id="progress-bar"></div> <p>Below is the debug list</p> <ol id="debug"></ol> <iframe id="upload-target" name="upload-target" src="about:blank"></iframe> </body> </html>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
upr-0.3.0 | examples/rails_app-2.3.4/app/views/files/pull.html.erb |
upr-0.2.0 | examples/rails_app-2.3.4/app/views/files/pull.html.erb |