What does your code do specifically when it uploads. The correct behaviour for an uploading script is something like:
while (there's more file to upload){
grab a reasonable chunk of the file, 1Kb for instance
write it to the server
}
So if it doesn't do that, it might use a lot of memory, as dragonchild says.
--
Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer. M-J D