The concept of my last link is this:
the instant before you do the upload you ask PHP to scan the tmp folder, or the
folder used to upload files (often the tmp) and you snap number of files, then
the upload starts, and it will create a temp file with a PHP predefined prefix,
you array_diff the snap with the current file list and you get the file that
the user is uploading.
At that point if you are lucky the input="file" field will give you access to
its fileSize, and you have everything to create a progress bar: the polled
incremental tmp file size in the server, plus the total in the client, a bit of
transitions/effects and that's it.
This method is not ideal, generally speaking, because it could easily suffer
concurrency between multiple users.
I did not know Flash player had to put the entire file in memory, it sounds
truly silly for scalability reasons, are you absolutely sure about this?
About APC you need to enable it and so far I had no problems with files up to
350 Mb , I wonder why 1Gb should be a problem.
> CC: firstname.lastname@example.org
> From: phpl...@planetphred.com
> To: f...@thefsb.org
> Date: Mon, 14 Sep 2009 13:16:13 -0500
> Subject: Re: [PHP] APC - Upload progress problem. apc
> On Sep 14, 2009, at 9:15 AM, Tom Worster wrote:
> > with files that big, perhaps could write client js that polls a
> > script on
> > the server that simply returns the file size(s)? if you want a
> > thermometer,
> > use the number to resize a colored div.
> Thanks Tom, for weighing in.
> Having js poll a script on the server is kind of what APC was about,
> and perl as well. Are you saying I could use PHP on the server side to
> do this? It seems almost obvious, but no one mentions it any where on
> the web, so a expected there was some fundamental limitation without
> Do you have any idea what this script might look like? Is it possible
> to get the temp file name before the upload is completed so that its
> size can be monitored?
> If it is, it is just too dang simple! ...but I'd take it for sure.
> Thanks, Phred
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
More than messages–check out the rest of the Windows Live™.