Project

General

Profile

Actions

Feature #1995

closed

passing X-Progress-Id in input hidden field

Added by scub over 15 years ago. Updated over 15 years ago.

Status:
Invalid
Priority:
Normal
Category:
mod_uploadprogress
Target version:
ASK QUESTIONS IN Forums:

Description

it would be nice if there was a feature to pass the X-Progress-ID as a hidden form input instead of header or query string as it's easier for code portability.

it would be easier to just create a input like:

<input type="hidden" name="X-Progress-Id" value="$upload_id" />

this is how APC and all other upload/ajax progress bars work (by simply passing it as a hidden POST).
since we re-use the code on several upload pages we wouldn't have to hard code the X-Progress-Id URL query string inside the java/ajax script. it would make it much easier to just pass it with the POST when uploading.

cheers

Actions #1

Updated by icy over 15 years ago

But this is suboptimal. If X-Progress-Id is sent via POST, then lighty needs to parse the request body in order to find it.
It's not only suboptimal but may not even work. If the file data comes before the id in the body, then you can't even register the upload before it is already done!
Using a header or queryparameter is the only way that makes sense.

Actions #2

Updated by scub over 15 years ago

icy wrote:

But this is suboptimal. If X-Progress-Id is sent via POST, then lighty needs to parse the request body in order to find it.
It's not only suboptimal but may not even work. If the file data comes before the id in the body, then you can't even register the upload before it is already done!
Using a header or queryparameter is the only way that makes sense.

well i've tried using the header method using header() in php and it the mod_upload seems to be ignoreing it, as i get no progress unless i use the query method.

i used header('X-Progress-Id: ' . md5(uniqid()));

..which sets the header with the 32bit string, but no status of upload.. works fine using query parameter though.

Actions #3

Updated by icy over 15 years ago

  • Status changed from New to Invalid

You are doing it wrong. You send the ID from the server to the client but you need to send it from the client (JS) to the server together with the POST data that is being uploaded so the upload can be registered.

Actions

Also available in: Atom