Jump to content

PHP upload progress bar

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
welton122

welton122

    Learning Programmer

  • Members
  • PipPipPip
  • 76 posts
hi all,

ok i have created an upload site (Jake Welton) which users can upload files to. Problem is there is not a upload progress bar. I am having trouble finding a way of creating such a thing. I have absolutely no idea where to start, can anyone help me???? or point me into the direction of some simple tutorials??

Many Thanks,
J

#2
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
Can't be done.

#3
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
You should look for an AJAX uploader progress bar, as this would need to be done in JS to show the progress based on the upload.

John said:

Can't be done.
PEAR includes many CLI based progress bar examples, can be done if you telnet to the PHP page.


Edited by Alexander, 21 October 2010 - 09:11 PM.

Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#4
welton122

welton122

    Learning Programmer

  • Members
  • PipPipPip
  • 76 posts
can someone point me towards some tutorials for doing this please

#5
DEViANT

DEViANT

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 358 posts
AJAX file upload tutorial

Quick google search returned the above posted tutorial. Hope it helps

:D You should rep+ me so that I can win :D

My Blog | Ask me!
Error : Satan did it

#6
fyhring4

fyhring4

    Newbie

  • Members
  • PipPip
  • 13 posts
Use AJAX, and then you can create a status process bar just this easy:

This should be in that file you load via AJAX
<table style="border: 1px solid #ACACAC; background-color: #FFFFFF">
<tr><td width="0%" style="background-color: #000000;"></td></tr>
</table>
Then you can set it to chance the value of the TD's width :)

#7
bbqroast

bbqroast

    Codecall Addict

  • Members
  • PipPipPipPipPipPipPip
  • 554 posts
Clever idea. Just make a javascript code to use AJAX to get the loading progress then convert into percentage and set that as the TD width.
Oh yea you might want to give the td an ID (id="progress-bar") then you can use the getElementById("progress-bar") function (might not be %100 correct).
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).

#8
udaymishra

udaymishra

    Newbie

  • Members
  • Pip
  • 2 posts
You can use a prebuild jQuery Uploader..

I almost always use uploadify (jQuery Plugin).
It has very cool features like progress bar, and multiple uploads.
Do give it a try.