Aethelwulf
Member
I'm using xenforo with nginx and thusfar it works perfectly with Xenforo by default image uploader. I'm running into problems though moving uploaded files from /tmp/ to /home/mysite/public_html/data/mycustomfolder/ with a custom script.
The problem is the image doesn't show up in /tmp/ despite having full 777 chmod perms and ownership and full 777 perms at the destination folder with ownership.
Does anyone have any suggestions? When I echo out the $source file it does show /tmp/cJ3jgj32/imagename.png but it is never actually in temp and thus it never copies to the destination.
The problem is the image doesn't show up in /tmp/ despite having full 777 chmod perms and ownership and full 777 perms at the destination folder with ownership.
PHP:
$image = XenForo_Upload::getUploadedFile('uploadedImage');
if($image->isImage() && $image->isValid()){
$source = $image->getTempFile(); //.'/'.$image->getFileName();
$destination = "/home/mysite/public_html/data/mycustomfolder/imagetest.png";
$success = move_uploaded_file($source, $destination);
}
Does anyone have any suggestions? When I echo out the $source file it does show /tmp/cJ3jgj32/imagename.png but it is never actually in temp and thus it never copies to the destination.
Last edited: