ID:               20344
 Comment by:       george at ishop dot co dot uk
 Reported By:      john at funnepa dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: any
 PHP Version:      4.3.0-pre2
 New Comment:

A cheap and painless way of achieving this would be to make use of the
temporary file name prefix (pfx parameter to mkstemp etc.) It is
currently HARD-CODED in rfc1867.c to "php".    It could just as easily
be picked up from the POST. 

This would make an upload progress bar in pure php a trivial exercise
i.e.

1. Generate a unique prefix e.g. timestamp/user id.
2. Pass it to a popup progress indicator immediate prior to
submission.
3. Include it as a variable on the post e.g. in UPLOAD_PREFIX
4. Get the popup search to for files with the specified prefix in the
temporary directory and display their file size. Refresh until no files
left.


In particular this can be easily retro-fitted to any existing uploads
since no code needs changing in the form target.


Previous Comments:
------------------------------------------------------------------------

[2002-11-10 14:48:23] john at funnepa dot com

Here's an idea that would have to be included in php itself, but it
would prove useful. The option to select a temp dir and filename that
is diffrent than the one in php.ini. One could use a timestamp and user
ID as a temp file name and track it's size in a new window to create a
progress bar for the upload. any comments?


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20344&edit=1

Reply via email to