Sha256: 84df952072f142ad09a811796dff29a4b8249c2e3c3fe5224cc295ee45ed5379

Contents?: true

Size: 1.87 KB

Versions: 2

Compression:

Stored size: 1.87 KB

Contents

<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title>upr test, http://upr.bogomips.org/</title>
    <%= javascript_include_tag :defaults %>
    <%= javascript_include_tag 'upr' %>
<style type="text/css">
#progress-bar {
  width:500px;
  height:25px;
  margin:15px;
  border:solid 1px #000;
  position:relative;
}

#progress-bar #status-bar {
  display:block;
  height:25px;
  width:0;
  background-color:#00f;
  border-right:solid 1px #000;
  position:absolute;
  top:0; left:0;
}

#progress-bar #status-text {
  display:block;
  padding: 0 15px;
  line-height:25px;
  position:absolute;
  top:0; left:0;
}
</style>
  </head>
  <body>
<%
upid = "#{Time.now.to_i}.#{rand}"
act = { :action => 'upload', :upload_id => upid }
opt = {
  :multipart => true,
  :target => 'upload',
  :onsubmit => "UploadProgress.monitor('#{escape_javascript(upid)}')"
}
-%>
<p>
  This is a demo of <a href="http://upr.bogomips.org/">upr</a> in action.
  Much of this (including all JS) was stolen from the mongrel_upload_progress
  examples.
</p>
<p>
  Also, see the <a href="/files/new">jQuery-compatible interface</a>
  that's also compatible with upload progress modules for nginx and lighttpd.
</p>
<p>
  Last but not least, check out the <a href="/files/pull">Ajax.Pull</a>
  example that uses a single, streaming HTTP response to interatively
  send progress updates.
</p>
<p><%= link_to upid, :action => 'status', :upload_id => upid %></p>
<% form_tag(act, opt) do %>
  <div id="file-fields">
    <p><%= file_field_tag :data %></p>
  </div>
  <p><%= link_to_function 'Add File Field', 'UploadProgress.FileField.add()' %>
  </p>
  <p><%= submit_tag :Upload %></p>
<% end %>

<div id="results"></div>
<div id="progress-bar"></div>

<p>The size and SHA1 of the file you uploaded should appear here</p>
<iframe id="upload" name="upload" 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/index.html.erb
upr-0.2.0 examples/rails_app-2.3.4/app/views/files/index.html.erb