Can I make UPLOAD Bar Show the upload process ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Supper Baby
Forum Commoner
Posts: 27
Joined: Tue Aug 01, 2006 11:33 pm

Can I make UPLOAD Bar Show the upload process ?

Post 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 ?

:?:
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post 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.
Supper Baby
Forum Commoner
Posts: 27
Joined: Tue Aug 01, 2006 11:33 pm

Post 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 ?

:?:
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

You can Fake, and add animated gif to your page, that is revealed by javascrip when the form is submitted.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I just use an animation that says uploading... with some sort of "loading" type animation that just repeats until it's finished.
Supper Baby
Forum Commoner
Posts: 27
Joined: Tue Aug 01, 2006 11:33 pm

Post 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.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post 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/
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

side note: php 5.2 will provide upload hooks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Uh, I think you're right.
pitty :(
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

volka wrote:Uh, I think you're right.
pitty :(
Indeed, an extreme disappointment.
Post Reply