Thanks, it works fine :)
in case somebody needs it, here is a check with regex to disallow whitespaces & special chars in file names
<script>
function CuteWebUI_AjaxUploader_OnSelect(files) {
var re = new RegExp('^[a-zA-Z0-9\._-]+$');
for (var i = 0; i < files.length; i++) {
var m = re.exec(files[i].FileName);
if (m == null) {
files[i].Cancel();
alert('The file "'+files[i].FileName + '" was not uploaded (unauthorized filename)');
}
}
}
</script>