Project

General

Profile

Feature #1995

passing X-Progress-Id in input hidden field

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

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
mod_uploadprogress
Target version:
Start date:
2009-05-31
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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

History

#1

Updated by icy over 10 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.

#2

Updated by scub over 10 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.

#3

Updated by icy over 10 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.

Also available in: Atom