Avoid duplicate in Asyncupload (Multiple Drag and Drop)

2 posts, 0 answers
  1. Tan
    Tan avatar
    23 posts
    Member since:
    Jan 2012

    Posted 18 Apr 2012 Link to this post

    To:

    Base on this example,
    http://demos.telerik.com/aspnet-ajax/upload/examples/async/additionalfields/defaultcs.aspx?product=asyncupload

    How to find the uploaded, uploading and selected all file while using asyncupload to avoid duplicate file name?



    From louisth
  2. Tan
    Tan avatar
    23 posts
    Member since:
    Jan 2012

    Posted 18 Apr 2012 Link to this post

    Here is the answer for share

    function ClearInvalidInputs(sender, eventArgs) {
       var upload = $find("<%= RadAsyncUpload1.ClientID %>");
       var inputs = upload.getUploadedFiles();
       for (i = inputs.length - 1; i >= 0; i--) {
           if (eventArgs.get_fileName() == inputs[i]) {
               alert(inputs[i] + " wasuploaded");
               sender.deleteFileInputAt(sender.getUploadedFiles().length);
               $(".ErrorHolder").append(eventArgs.get_fileName() + "duplicate file name have been remove automatically.<br/>").fadeIn("slow");
           }
       }
    }
Back to Top