Tore B. Krudtaa wrote:
To D. Dante Lorenso:
Thanks for notifying me of:
http://digitarald.de/project/fancyupload/
But I would still like to see the upload hooks accessible from within a 
standard PHP inst., which would give me more control of the upload progress as 
well as more control in the feedback to the client, and it would be even more 
browser compatible.

A year or so ago, I too wanted the ability to track incoming media uploads. I wanted to build an admin page which would show me a list of all users that are currently uploading media and how far into the process they had gone.

For a multimedia site like my http://www.pubclip.com/, I could potentially have several dozen users uploading videos up to 256MB each. If I needed to restart a server or do maintenance, it would be nice to check that those users weren't already at 90% of their upload and would lose all progress if I restarted a machine.

I imagined a hook/callback that would just log the userid, file size, uploaded-so-far size, and other light meta data to some storage location (memcached, postgresql, mysql, flat file, etc) which an admin could scoop up for a quick overview of what's going on.

So what about the PECL uploadprogress:
Same problem as when using APC, my customers PHP inst. does not have this 
installed and nothing I can do about that PHP inst.

It sounds like if you can not modify the PHP installation, you'll need to find a client-side only solution. If feedback to a user on his OWN upload is all you want, the client-side solution is sufficient. If the customer is using your application, just require Flash and Javascript in order to allow uploads using the fancy uploader. Provide a crappy, non-fancy uploader for users refusing to install Flash.

Client-side feedback should really be built into browsers since it's information that only the client needs. We already have data for downloads that project time remaining, etc. Tell Mozilla/Firefox, and IE teams to implement this for uploads also.

My example of when an admin needs the upload progress data on the server is one of the rare examples when you actually NEED the callback hooks in PHP since there is no other way to gather the data without trusting clients to periodically come tell you.

-- Dante



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to