Client Side Check if file length is zero

Thread is closed for posting
4 posts, 0 answers
  1. DK
    DK avatar
    72 posts
    Member since:
    Jun 2009

    Posted 01 Sep 2009 Link to this post

    How can i find the lenght of the file client side.
    I am using only radupload not rad progress area and progress manager.

    let me know how can i restrict user to not upload file having size 0  by client side script.
    i do not want to hit server for this task.
    i want to check it client side.
    plz suggest me some logic for this
  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 01 Sep 2009 Link to this post

    This documentation article should answer your question:
    http://www.telerik.com/help/aspnet-ajax/upload_howtoclientfilesize.html
  3. DK
    DK avatar
    72 posts
    Member since:
    Jun 2009

    Posted 01 Sep 2009 Link to this post

    I am not using progress manager and progress area.
    and the example you given is using progress area.
    please suggest me different one in which there is no use of progress area and progress manager
  4. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 02 Sep 2009 Link to this post

    Well it seems like this might be a little bit tricky, a quote from the link I gave you:
    "While it is not possible to check the file size before upload begins, you can use the client-side OnClientProgressUpdating event to access information about the file size when it first becomes available."
    Also check out this documentation article on the known limitations of radupload.
    Since this is a security thing with the javascript engine of browsers, perhaps you should consider implementing a progress area/manager. I do believe you could set them to visible = false and still maintain the functionality behind them (the communication that you need between the client and server).
Back to Top