This is a migrated thread and some comments may be shown as answers.

Remove files from selection after selecting

1 Answer 101 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
JP
Top achievements
Rank 1
JP asked on 01 Nov 2012, 02:10 PM
Hi,

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?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Atn
Top achievements
Rank 1
answered on 01 Nov 2012, 03:50 PM
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");
  
      }
   }
Tags
AsyncUpload
Asked by
JP
Top achievements
Rank 1
Answers by
Atn
Top achievements
Rank 1
Share this question
or