Page 1 of 1
Can I make UPLOAD Bar Show the upload process ?
Posted: Sat Aug 19, 2006 7:20 pm
by Supper Baby
Hello every one,
Can I make UPLOAD Bar Show the upload or Download process ?
I'll use PHP & JavaScript ( Ajax ) but I can't find any way to do it.
I think it can be done via Java not sure about JS
Is there any one have idea about it or if he knows if I can do it using JS or not ?

Posted: Sat Aug 19, 2006 10:46 pm
by Jenk
It is possible, but is not 'easy' and is long-winded for what is essentially.. not worth it.
XMLHttpRequest and a seperate PHP request from the one that you wish to check the progress off can do it.
Posted: Sun Aug 20, 2006 1:11 am
by Supper Baby
I can't imagine it.
How can I handle the Download process via PHP or Ajax ??
I've movie or picture or any file which visitor will download it. I can't separate the file.
how can I seperate PHP request ?? if I have one file ?

Posted: Sun Aug 20, 2006 5:26 am
by Shendemiar
You can Fake, and add animated gif to your page, that is revealed by javascrip when the form is submitted.
Posted: Sun Aug 20, 2006 11:30 am
by Luke
I just use an animation that says uploading... with some sort of "loading" type animation that just repeats until it's finished.
Posted: Sun Aug 20, 2006 12:07 pm
by Supper Baby
Thank you for you help.
I looking for realy download bar show the upload process the time left, download speed, downloaded size and size left.
I need it like OS and DAP.
Posted: Sun Aug 20, 2006 1:58 pm
by nickvd
Php can not do this, at least not without an extention to be installed. Almost any time you see a php site use an upload progress bar, it's a perl script in the background that's processing the upload. Php doesn't receive the uploaded file's details (size, filename, etc) until the whole file is uploaded, whereas perl receives the file as it's being uploaded and can there fore check how much is left in the upload.
Give Uber-Uploader a try, I haven't had a chance to check it out yet, but it's widely used:
http://uber-uploader.sourceforge.net/
Posted: Sun Aug 20, 2006 2:04 pm
by volka
side note: php 5.2 will provide upload hooks.
Posted: Sun Aug 20, 2006 2:53 pm
by feyd
volka wrote:side note: php 5.2 will provide upload hooks.
Unless I've missed the discussion, I think it's only provided to the internals. So an extension could provide information, but inside of PHP, I don't think it's available.
Posted: Mon Aug 21, 2006 9:20 am
by volka
Uh, I think you're right.
pitty

Posted: Mon Aug 21, 2006 9:27 am
by feyd
volka wrote:Uh, I think you're right.
pitty

Indeed, an extreme disappointment.