Module: Upr::Params
- Included in:
- InputWrapper, JSON
- Defined in:
- lib/upr/params.rb
Instance Method Summary collapse
-
#extract_upload_id(env) ⇒ Object
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.
Instance Method Details
#extract_upload_id(env) ⇒ Object
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
13 14 15 16 17 18 19 20 21 |
# File 'lib/upr/params.rb', line 13 def extract_upload_id(env) upid = env['HTTP_X_PROGRESS_ID'] and return upid # can't blindly parse params here since we don't want to read # the POST body if there is one, so only parse stuff in the # query string... params = Rack::Request.new(env).GET env["upr.upload_id"] = params["X-Progress-ID"] || params["upload_id"] end |