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

Allowing upload only if required files are present

1 Answer 14 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jeffrey
Top achievements
Rank 1
Jeffrey asked on 19 Sep 2019, 01:58 PM

I'm trying to create a scenario where the upload must contain exactly 9 files and a way to validate that each one exists.

Is there a way to grab the process, perhaps client side that would allow me perform this check? The methods I've found so far seem to operate on one file uploaded at a time rather than being to examine the entire batch before sending the files. Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter Milchev
Telerik team
answered on 24 Sep 2019, 01:22 PM

Hello Jeffrey,

You can use the following article to prevent the postback if the validation fails (or use the .get_isUploading() method of the AsyncUpload's client-side object): 

Regarding the validation itself, you can use the .getUploadedFiles() method of the client-side object of the AsyncUpload: 

Regards,
Peter Milchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
AsyncUpload
Asked by
Jeffrey
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or