OnClientFileUploading
The OnClientFileUploading occurs before the RadCloudUpload starts to upload the specified file to the Cloud Storage Provider. This event can be cancelled.
The event handler receives two parameters:
The instance of the RadCloudUpload control firing the event.
An eventArgs parameter containing the following methods:
get_row returns the created row from the FileListPanel section (
<LI>
element)get_fileName returns the name of the file selected
set_cancel cancel the upload process
<telerik:RadCloudUpload runat="server" ID="RadCloudUpload1" OnClientFileUploading="onClientFileUploading" ...>
</telerik:RadCloudUpload>
function onClientFileUploading(sender, eventArgs) {
alert(eventArgs.get_fileName().length);
if (eventArgs.get_fileName().length > 20) {
eventArgs.set_cancel(true);
}
else {
eventArgs.set_cancel(false);
}
}