Publisher review:Mega Upload is a PHP File uploader with progress bar. To create a progress bar you need to measure how many bytes have been uploaded and compare this against the total number of bytes to be uploaded. (The total file size) This information can only be retrieved by manually processing the form submission.
While other technologies like perl or J2EE gives access to the raw POST data PHP does not. Strangely enough PHP does have a variable named RAW_POST_DATA but this is populated only if the engine cannot identify the content type of the POST data. This might tempt you to change the enctype of the form field to something other than multipart/form-data. You would quickly realize that just the filename is passed on to the server instead of the file being uploaded.
All this is rather suprising if you have become used to the access provided by php to lots of low level functionality. On the other hand when we did lekana.com we implemented a progress bar in JSP and found it really easy going.
The answer that we came up with mixes PHP with perl. On most servers where PHP is installed you are certain to find perl as well. Though the perl manual strongly urges you to avoid tinkering with the raw post data, it's quite easy to manipulate it to create a pop that indicates upload percentage.
Then again most PHP programmers today aren't comfortable working with perl. So we will pass on the processing to a PHP script once file upload is complete. You are then back in familiar territory.
The downloadable tarball contains a perl script to produce a progress indicator, a simple HTML form and a php script to take over once upload is complete.
Mega Upload 1.45 is a PHP script for File Management scripts design by Raditha Dissanayake.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris