Right now the when uploading a file, the file in its entirety is sent to the server before the user is made aware that there is already a file with that name in the target directory.
Ajax Validation could be made to check before Posting the Form.
on Trigger ... Something like.
jQuery.getJSON('./scripts/Ajax/Owl/fileexists.php?sess='+ jQuery('#sess').val() + '&parent=' + jQuery('#parent').val() + '&filename=' <get filename from file input field>', function(data){
if(data)
{
if (data.returnval == 1)
{
alert ('File you are trying to upload already exists in the Target directory');
return false;
}
}
});
Right now the when uploading a file, the file in its entirety is sent to the server before the user is made aware that there is already a file with that name in the target directory.
Ajax Validation could be made to check before Posting the Form.
on Trigger ... Something like.