How to get uploading file size on select event in client side?

4 posts, 0 answers
  1. Denius Valiant
    Denius Valiant avatar
    9 posts
    Member since:
    Jan 2013

    Posted 10 Apr 2013 Link to this post

    Hi,

    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.
  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 11 Apr 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Denius Valiant
    Denius Valiant avatar
    9 posts
    Member since:
    Jan 2013

    Posted 11 Apr 2013 Link to this post

    Hi,

    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.
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 11 Apr 2013 Link to this post

    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.
Back to Top