RE: APC - Upload progress problem. apc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Regards

> CC: php-general@xxxxxxxxxxxxx
> From: phplist@xxxxxxxxxxxxxxx
> To: fsb@xxxxxxxxxx
> Date: Mon, 14 Sep 2009 13:16:13 -0500
> Subject: Re:  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  
> APC.
> 
> 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™.
http://www.microsoft.com/windows/windowslive/

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux