3 Answers, 1 is accepted
You can change the allowed file extensions of the RadAsyncUpload on the client using set_allowedFileExtensions property:
var
upload = $find(
'RadAsyncUpload1'
);
upload.set_allowedFileExtensions(
".msi,.gif"
)
RadAsyncUpload has no client-side properties for MultipleFileSelection and MaxFileSize.
Regards,
Aneliya Petkova
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Hello Team,
var upload = $find('RadAsyncUpload1');
upload.set_allowedFileExtensions(".msi,.gif")
its not working for me its giving error on setting the extension.
Here is my code:-
function OnClientValidationFailed(sender, args) {
debugger
var $row = $(args.get_row());
var erorMessage = getErrorMessage(sender, args);
if (erorMessage != undefined) {
var span = createError(erorMessage);
$row.addClass("ruError");
$row.append(span);
}
}
function getErrorMessage(sender, args) {
debugger
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(fileExtention.indexOf('F')!=0){
return ("Invalid file type");
}
}
else {
return ("not correct extension.");
}
}
function createError(erorMessage) {
debugger
var input = '<span class="ruErrorMessage">' + erorMessage + ' </span>';
return input;
}
function OnClientFileUploading(sender, args) {
debugger
var fileExtention = args.get_fileName().substring(args.get_fileName().lastIndexOf('.') + 1, args.get_fileName().length);
var upload =("FileUpload");
upload.set_allowedFileExtensions("." + fileExtention);
}
<telerik:RadAsyncUpload ID="FileUpload" runat="server" OnFileUploaded="Upload_FileUploaded" OnClientValidationFailed="OnClientValidationFailed" OnClientFileUploading="OnClientFileUploading">
</telerik:RadAsyncUpload>
The extension which I want to set is dynamic like 354647.F01,977543.F08 only "F" will be common in the extension.so i m not able to set it through "AllowedFilesExtensions" property.
And "OnClientValidationFailed" property is not working with setting "AllowedFilesExtensions" property.
so please help me this. or suggest me if there is any other way to do this.
Please reply ASAP.
The js error you are getting is because of the following line in your OnClientFileUploading handler:
var
upload =(
"FileUpload"
);
It has to be changed as follows, so that the "upload" variable holds a reference to the AsyncUpload object:
var
upload = $find(
"FileUpload"
);
var
upload = sender;
Regards,
Ivan Danchev
Telerik