Hello,
I made a snippet who uploads files but when i upload files on a 555 chmoded folder, I’d like to return an error on the frontend.
Here is my code :
if(!@move_uploaded_file($_FILES['Filedata']['tmp_name'],basename($_FILES['Filedata']['name']))){
$this->logUploadError();
}
My problem is : When the move_upload_file fails (’cause I can’t write in the folder) I see in my modx error log the Parser error, but the fonction I’ve made ($this->logUploadError();) isn’t executed. Is there a way to make this possible?