diff options
Diffstat (limited to 'examples/rails_app-2.3.4/app/views/files/pull.html.erb')
-rw-r--r-- | examples/rails_app-2.3.4/app/views/files/pull.html.erb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/examples/rails_app-2.3.4/app/views/files/pull.html.erb b/examples/rails_app-2.3.4/app/views/files/pull.html.erb new file mode 100644 index 0000000..275704d --- /dev/null +++ b/examples/rails_app-2.3.4/app/views/files/pull.html.erb @@ -0,0 +1,46 @@ +<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><%= 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> |