It seems that something like this would work. If you can find the temporary file while it's uploading, you could have a different script in a new window retrieve the size of the temporary file every 5 or 10 seconds, then do some math to convert that into a percent of the total size. The graph could simply be like a single-color GIF that had its WIDTH= tag updated with the percentage of the upload and the actual percentage shown underneath.
Maybe you could use $_FILES['userfile']['tmp_name'] (or $HTTP_POST_FILES []) for the progress reporting script? Just my $.02 - just learning all this stuff myself! Jason Soza ----- Original Message ----- From: "Stuart Dallas" <[EMAIL PROTECTED]> Date: Friday, May 3, 2002 12:16 pm Subject: Re: [PHP-WIN] File Uploader - Progress > On 3 May 2002 at 15:57, Mike Flynn wrote: > > At 01:21 AM 5/4/02 +0530, Arijit Chaudhuri wrote: > > >File uploads are a breeze to code in php. However, I have got a > > >request from a client to show the percentage uploaded or some > graphic> >progress monitor as the upload process is difficult to > track for > > >large files. Is there any way of coding such a progress tracker for > > >file uploads in php? > > > > Unfortunately, I don't think there is. The file data is sent in the > > *request* for the PHP page, meaning the PHP page doesn't even > get sent > > back to the user until the file is done uploading. So there's not > > really any choice but for the user to view the page with the upload > > form until the file is done uploading. > > I've been thinking about this, and there may be a way. I don't > know how PHP handles file > uploads, but it has to be saving the file it's receiving > somewhere. You could launch a popup > window when the form is submitted. That popup goes to a page that > gets the size of the file > PHP is saving the upload to and displays it and refreshes itself > periodically. > I dunno if it would work, but it's a possibility. > > -- > Stuart > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php