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

How to add a custom uploading filename max length validator to the Upload control?

3 Answers 78 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Nuttachai
Top achievements
Rank 1
Nuttachai asked on 04 Mar 2020, 08:11 AM
Hi,

I want to check the uploading filename max length, I could achieve this by checking the uploading filename in the UploadEvent and alert the error message, but I wish to show it in the Upload control like default style (See attached image).

How could I achieve this?


Thanks,

3 Answers, 1 is accepted

Sort by
0
Nuttachai
Top achievements
Rank 1
answered on 04 Mar 2020, 08:14 AM

Attached image:

0
Dimiter Madjarov
Telerik team
answered on 05 Mar 2020, 11:15 AM

Hello,

Currently the Upload displays the gray warning text only when the file fails any of the built in restrictions (file type, min file size, max file size).

https://www.telerik.com/kendo-angular-ui/components/uploads/upload/restrictions/#toc-types-of-file-restrictions

In the current scenario we could indeed validate the file name length in the appropriate event handlers, however the warning text should be displayed using another approach e.g. dialog, template etc.

Regards,
Dimiter Madjarov
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nuttachai
Top achievements
Rank 1
answered on 10 Mar 2020, 03:25 AM
Got it, Thanks
Tags
Upload
Asked by
Nuttachai
Top achievements
Rank 1
Answers by
Nuttachai
Top achievements
Rank 1
Dimiter Madjarov
Telerik team
Share this question
or