How to get uploading file size on select event in client side?
I need to get uploading file size before a file will be uploaded.
Thank you in advance.
3 Answers, 1 is accepted
0
Kate
Telerik team
answered on 11 Apr 2013, 10:38 AM
Hi Denius,
You can use the OnClientFileUploaded event and get the length of the file with the following code:
function OnClientAdded(sender, args) {
alert( args.get_fileInfo().ContentLength);
}
Kind regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Sorry, I don't understand your explanation.
As I understand the OnClientFileUploaded client-side event occurs after a file has been uploaded. I need to get uploading a file size before the file will be uploaded.And the OnClientAdded client-side event occurs when a new row
has just been added to the RadAsyncUpload control.
It's event of UI action.
Could you please explain again.
Best regards.
0
Kate
Telerik team
answered on 11 Apr 2013, 01:51 PM
Hello Denius,
Unfortunately with the current implementation of the RadAsyncUpload control it is not possible to get the size of the file using the OnClientAdded event. Therefore I suggested a later event where this value is available on the client side.
Regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.