I am using the Telerik File Explorer in my web application, and I need assistance with the default file upload feature. I have two specific requirements:
Fetching the File Name: How can I programmatically retrieve the file name from the default upload feature in Telerik File Explorer when a user selects a file?
Setting Character Limit Validation: I want to implement a validation rule to limit the file name to a maximum of 100 characters. If the file name exceeds this limit, an error message should appear, instructing the user to shorten the file name.
I tried to fetch the select file from below code. But it wasn’t successful.
function onClientFileSelected(radUpload, eventArgs) {
var input = eventArgs.get_fileInputField();
alert(input);
}
Note:
<telerik:RadUpload id="RadUpload1" runat="server" allowedfileextensions=".zip,.txt" onclientfileselected="onClientFileSelected" />
This hasn’t used inside my .ascx file.
Above image is when the user selected a invalid file, How do i add a new validation message for the character length.