3 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
4 <title>upr test, http://upr.bogomips.org/</title>
5 <%= javascript_include_tag :defaults %>
6 <%= javascript_include_tag 'upr' %>
7 <style type="text/css">
12 border:solid 1px #000;
16 #progress-bar #status-bar {
20 background-color:#00f;
21 border-right:solid 1px #000;
26 #progress-bar #status-text {
37 upid = "#{Time.now.to_i}.#{rand}"
38 act = { :action => 'upload', :upload_id => upid }
42 :onsubmit => "UploadProgress.monitor('#{escape_javascript(upid)}')"
46 This is a demo of <a href="http://upr.bogomips.org/">upr</a> in action.
47 Much of this (including all JS) was stolen from the mongrel_upload_progress
51 Also, see the <a href="/files/new">jQuery-compatible interface</a>
52 that's also compatible with upload progress modules for nginx and lighttpd.
55 Last but not least, check out the <a href="/files/pull">Ajax.Pull</a>
56 example that uses a single, streaming HTTP response to interatively
57 send progress updates.
59 <p><%= link_to upid, :action => 'status', :upload_id => upid %></p>
60 <% form_tag(act, opt) do %>
61 <div id="file-fields">
62 <p><%= file_field_tag :data %></p>
64 <p><%= link_to_function 'Add File Field', 'UploadProgress.FileField.add()' %>
66 <p><%= submit_tag :Upload %></p>
69 <div id="results"></div>
70 <div id="progress-bar"></div>
72 <p>The size and SHA1 of the file you uploaded should appear here</p>
73 <iframe id="upload" name="upload" src="about:blank"></iframe>