diff options
Diffstat (limited to 'examples/rails_app-2.3.4/app')
-rw-r--r-- | examples/rails_app-2.3.4/app/controllers/files_controller.rb | 2 | ||||
-rw-r--r-- | examples/rails_app-2.3.4/app/views/files/index.html.erb | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/examples/rails_app-2.3.4/app/controllers/files_controller.rb b/examples/rails_app-2.3.4/app/controllers/files_controller.rb index 4efc115..6509a71 100644 --- a/examples/rails_app-2.3.4/app/controllers/files_controller.rb +++ b/examples/rails_app-2.3.4/app/controllers/files_controller.rb @@ -33,10 +33,8 @@ class FilesController < ApplicationController end size = file.stat.size File.unlink(file.path) - dump = Rack::Utils.escape_html(params.inspect) render :text => "sha1: #{digest.hexdigest}<br />" \ "size: #{size}<br />" \ - "params: #{dump}<br />" \ '<script type="text/javascript">' \ 'window.parent.UploadProgress.finish();</script>' end diff --git a/examples/rails_app-2.3.4/app/views/files/index.html.erb b/examples/rails_app-2.3.4/app/views/files/index.html.erb index b604ee0..fe7cfc5 100644 --- a/examples/rails_app-2.3.4/app/views/files/index.html.erb +++ b/examples/rails_app-2.3.4/app/views/files/index.html.erb @@ -1,7 +1,7 @@ <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> - <title>upr test</title> + <title>upr test, http://upr.bogomips.org/</title> <%= javascript_include_tag :all %> <style type="text/css"> #progress-bar { @@ -41,6 +41,11 @@ opt = { :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><%= link_to upid, :action => 'status', :upload_id => upid %></p> <% form_tag(act, opt) do %> <div id="file-fields"> @@ -54,6 +59,7 @@ opt = { <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> |