Welcome Guest, Not a member yet? Register   Sign In
Progress bar for file uploading?
#1

[eluser]Unknown[/eluser]
My FTP upload script is working fine, but I need to implement a progress bar so that the users can see the status of their file upload.

I know that PHP doesn't have the capability to monitor this itself, but does anyone have any ideas or examples of a simple script that can monitor this?
I don't want to have to re-write my upload script since it is working great and would like something that integrates well with CodeIgniter.

All of the things that I have found with a progress bar are packed in with another upload script which seems would take a long time to pick it apart just to get the status bar element to work.

Any ideas?
#2

[eluser]Cro_Crx[/eluser]
The basic Idea is that PHP can check the file size of the file you are uploading and you can establish the total size. So with this information you can actually get the current upload progress.

To make this run in parallel with uploading a file you'll need to use an iFrame or similar.

The whole idea is very well documented here http://scriptperfect.com/2009/09/php-fil...etch-pecl/

Update: Forgot to mention you need the APC package for PHP, so if you're using a shared host you might run into some problems. Here's another example.

http://www.ibm.com/developerworks/librar...index.html




Theme © iAndrew 2016 - Forum software by © MyBB