Upr::Params

Public Instance Methods

extract_upload_id(env) click to toggle source

we’ll add compatibility for existing upload progress modules we find here, but under no circumstances will we help proliferate new and subtly incompatible mechanisms. X-Progress-ID is used in both lighttpd and nginx (3rd party module) “upload_id“ is used by mongrel_upload_progress

    # File lib/upr/params.rb, line 13
13:     def extract_upload_id(env)
14:       upid = env['HTTP_X_PROGRESS_ID'] and return upid
15: 
16:       # can't blindly parse params here since we don't want to read
17:       # the POST body if there is one, so only parse stuff in the
18:       # query string...
19:       params = Rack::Request.new(env).GET
20:       env["upr.upload_id"] = params["X-Progress-ID"] || params["upload_id"]
21:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.