Re: client<->server upload communication?

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

 



Your page currently has a JS error but...

The short answer is not in PHP. The PHP script doesn't 'process' the upload of the file. When the file is received by the server, the script (line 1) starts executing AFTER the file is already fully uploaded, and the files temporary location is references in the $_FILES array.

You may be able to get access the the state of the upload using a PECL extension, I remember reading something somewhere...

My assumption here is you're trying to write a progress bar or something similar?

If all you're after is a 'state' then you could submit your form to an embedded <iframe> and have the resulting page run an "I'm done" javascript, but that would only give you the start (when the user clicks submit) and the end (when the done function runs), it won't give you a true state during the course of the upload.

- Jeff

P.S. You could use perl as it has access to the file WHILE it's uploading, not just after, but that's for a different list :c)


On 6-Aug-06, at 10:56 AM, tedd wrote:

Hi gang:

I posted this question on a js list, but didn't received an answer. Maybe someone here might be able to provide some insight or direction.

In my ajax "experiment" monitoring states, namely:

http://xn--ovg.com/ajax_readystate

I can see the readyState replies/conditions.

Is there something similar when uploading a file or image?

There has to be some sort of communication between the sender and the receiver, right?

If so, is there a way to tap into that communication?

Thanks in advance for any replies.

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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