Major changes to Mega Upload

April 14, 2004

I have just released version 1.40 of mega upload, my progress monitor for PHP file uploads. This version should scale better than older versions because the architecture has changed.

note: before you read this blog entry you might want to take a quick look at the mega upload intro. Don't worry it's brief.

In the older versions the browser would post the data to a perl script. The perl script would process the incoming data and keep a marker on the server's hardisk. This marker will be accessed by another script which would calculate the progress and show what percentage has been uploaded. The data would then be posted again by the perl script to the php script. This second 'internal' post would allow the php developer to take charge of the file upload from there on.

In the new version the perl script still accepts the incoming post data but instead of re-posting the data to the target php script, the perl script accepts the responsibility of processing the post data, extracting the files from it and saving it to disk. Once this has been done a list of file are passed to the target php script.

Now the php script is no longer directly responsible for processing the file upload - it doesn't really matter anyway because the PHP engine used to take care of this for you. But you do need to make a small change. Just replace all occurances of $_FILE with $_REQUEST and your script will work just the way it used to - except it may take up a little less memory.

Posted by raditha at April 14, 2004 2:46 PM
Your Ad Here

 

Jabber  |  Linux  |  mySQL  |  PHP  |  Java  |  Site Map  |  Wiki

Downloads  |  About  |  Links  |  Contact  |  Home

 

Copyright © Raditha Dissanayake 2003 - 2007

Terms of Use  |  Privacy

 

 

April 2004
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30