Re: PHPfileuploader errors

  •  06-24-2009, 4:39 AM

    Re: PHPfileuploader errors

    $uploader->TempDirectory="/home/charterh/tmp";
     This doesn't work for me, I changed the GetSystemTempFolder back to the original and tried the above and nothing happens, the file uploads "somewhere" but after the upload the "Uploaded File:" information doesn't appear.
     
    The MoveTo method just use the move function , so the parameter should be a full path instead of a directory.
    Looking at the source the MoveTo function use the rename function ie. rename($this->FilePath,$newpath);
     
    If I use $mvcfile->MoveTo("/home/charterh/uploads"); I get this error:
     
    Warning: rename(/home/charterh/tmp/uploadertemp/persisted.e980b51f-cf0c-48d7-bdbb-a655293f5944.IMAG0084.jpg.resx,/home/charterh/uploads) [function.rename]: Is a directory
     
    Which looks like the error is caused by trying to rename a file to a directory which is why I now use
     
    $mvcfile->MoveTo("/home/charterh/uploads/".$mvcfile->FileName);
     
    Full Path + filename.
     
    Regards,
    Cary
     
     
     
     
     
     
     
     
     
View Complete Thread