At present, when an invalid file is selected, the alert message does not clearly indicate what is the validation error - invalid extension or the size being too large. It should show a message that clearly states what the problem is so the user can fix it.
For the time being you can handle the AsyncUpload's OnClientValidationFailed event and show different messages—http://docs.telerik.com/devtools/aspnet-ajax/controls/asyncupload/client-side-programming/onclientvalidationfailed.
Example:
ASP.NET
-------------------------------
<telerik:RadFileExplorer runat="server" ID="RadFileExplorer1">
<Configuration ViewPaths="~/" UploadPaths="~/" DeletePaths="~/" SearchPatterns="*.jpg" />
</telerik:RadFileExplorer>
<script>
// Prevent the built-in validation alert
Telerik.Web.UI.RadFileExplorer.prototype._showUploadValidationFailedAlert = function () {
}
function OnClientValidationFailed(sender, args) {
var fileExtention = args.get_fileName().substring(args.get_fileName().lastIndexOf('.') + 1, args.get_fileName().length);
if (args.get_fileName().lastIndexOf('.') != -1) {//this checks if the extension is correct
if (sender.get_allowedFileExtensions().indexOf(fileExtention) == -1) {
alert("Wrong Extension!");
}
else {
alert("Wrong file size!");
}
}
else {
alert("not correct extension!");
}
}
</script>
-------------------------------
C#
-------------------------------
RadFileExplorer1.AsyncUpload.OnClientValidationFailed = "OnClientValidationFailed";
-------------------------------
VB
-------------------------------
RadFileExplorer1.AsyncUpload.OnClientValidationFailed = "OnClientValidationFailed"
-------------------------------