Re: Getting File Duplicate Alert even if I have removed the file from upload

  •  10-19-2011, 10:34 AM

    Re: Getting File Duplicate Alert even if I have removed the file from upload

    Hi lbhatt,
     
    Please try the example below
     
    <%@ Page Language="C#" Title="Customize the queue UI" %>

    <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    </head>
    <body>
        <form id="Form1" runat="server">
            <CuteWebUI:UploadAttachments ID="uploader1" runat="server" ManualStartUpload="true">
            </CuteWebUI:UploadAttachments>
        </form>
    </body>

    <script>
     var uploadedFiles;
     function CuteWebUI_AjaxUploader_OnSelect(files)

    {
       for(var i=0;i<files.length;i++)
       {
            for(var j=0;j<uploadedFiles.length;j++)
            {
                if(files[i].FileName==uploadedFiles[j].FileName)
                {
                    alert("already has the same file");
                    return false;
                }
            }
       }
     }
    function CuteWebUI_AjaxUploader_OnQueueUI(list)
    {
       uploadedFiles=list;
    }
    </script>

    </html>
     
    Regards,
     
    Ken
View Complete Thread