Hi,
Please also check this sample :
-
<script type="text/javascript">
-
//prevent duplicated items:
-
function CuteWebUI_AjaxUploader_OnSelect(files)
-
{
-
var sames=[];
-
var items=uploader.getitems();
-
for(var i=0;i<files.length;i++)
-
{
-
var file=files[i];
-
var exists=false;
-
for(var j=0;j<items.length;j++)
-
{
-
var item=items[j];
-
if(item.FileName==file.FileName)
-
{
-
exists=true;
-
}
-
}
-
if(exists)
-
{
-
sames.push(file.FileName);
-
file.Cancel();
-
}
-
}
-
if(sames.length>0)
-
{
-
alert("These file(s) are already in the queue : \r\n\t"+sames.join('\r\n\t'));
-
}
-
}
-
</script>
Regards,
Terry