Hello, I’m having problems running this line inside a hook in formit.
if(move_uploaded_file($_FILES[$sf]['tmp_name'], $myTarget)) {...
Pats to folders and file names are all right:
$myTarget = $target_path . $storeName . ‘_’ . $filename;
I can see the pats in the error log and everything is ok:
$modx->log(modX::LOG_LEVEL_ERROR, $_FILES[$sf]['tmp_name']);
$modx->log(modX::LOG_LEVEL_ERROR, $myTarget);
The file is uploaded successful into assets/components/formit/tmp/
but it’s not moving it.
the /tmp/ folder has permissions 0755 but I tried 1777 but still not working.
any ideas? thanks!