bug fix for big file(s)
Status: Beta
Brought to you by:
legend9
it's work, and it's great,but has a problem when handling big file(s). so I modified upu.class.php to make the final 'copy' action done in a loop.
// fwrite($writeHandle, @fread($readHandle,$this->formData[$k]['filesize']));
// fclose($writeHandle);
$readsize = $this->bufferSize > $this->formData[$k]['filesize'] ? $this->formData[$k]['filesize'] : $this->bufferSize ;
$left_size = $this->formData[$k]['filesize'] - $readsize;
while(fwrite($writeHandle, @fread($readHandle,$readsize))){
$readsize = $this->bufferSize > $left_size ?
$left_size : $this->bufferSize ;
$left_size -= $readsize;
}
fclose($writeHandle);