upr.git  about / heads / tags
Upload Progress for Rack
blob c3ddddab578a471f8c5a6c0ffad061347e66fc17 274 bytes (raw)
$ git show HEAD:examples/rails_app-2.3.4/app/controllers/progress_controller.rb	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 
class ProgressController < ApplicationController
  def index
    opt = {
      :backend => $upr,
      :frequency => 0.5,
      :env => request.env,
    }
    response.headers.update(Upr::JSON::RESPONSE_HEADERS)
    render(Upr::JSON.new(opt).rails_render_options)
  end
end

git clone https://yhbt.net/upr.git