Remove files from selection after selecting

2 posts, 0 answers
  1. JP
    JP avatar
    122 posts
    Member since:
    Aug 2011

    Posted 01 Nov 2012 Link to this post


    I'm using the RadAsyncUpload with multiple file selection. We need to enforce that only files with a specific naming rule are uploaded.

    What I want to do is to check all selected filenames and to remove the files which don't fulfill the naming rule.

    But in the OnClientFilesSelected function I have no access to the selected files. Am I right that the only possibility to manipulate the files to be uploaded is to do so in OnClientFilesUploaded?

  2. Atn
    Atn avatar
    4 posts
    Member since:
    Nov 2011

    Posted 01 Nov 2012 Link to this post

    This snippet should do the work, the file names are in inputs.

    function ClearInvalidInputs() {
          var upload = $find("<%= RadAsyncUpload1.ClientID %>");
          var inputs = upload.getUploadedFiles();
          for (i = inputs.length - 1; i >= 0;i--) {
            alert(inputs[i] + " was  uploaded");
Back to Top