MaxFileSize and MaxInputFileCount

Thread is closed for posting
2 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 04 Feb 2009 Link to this post


    The MaxFileSize and MaxInputFileCount for the RadUpload: how does this get validated, on the server or on the client?  Does the RadUpload prevent uploading a file that violates the MaxFileSize property on the client, or on the server during some event?  Can that be validated using a Validator control?

  2. Erjan Gavalji
    Erjan Gavalji avatar
    1455 posts

    Posted 06 Feb 2009 Link to this post

    Hi Brian,

    MaxFileSize is a validation property, checked on the server only. This comes because of a limitation with the FileInput fields - the size of the file cannot be read by the browser. Despite the limitation, there is a workaround provided by RadUpload to check the total request size on the client. The Checking File Size on the Client article demonstrates the approach and provides some sample code.

    MaxFileInputCount property only defines RadUpload's behavior. It is not used for any validation, that's why it is managed only on the client.

    I hope this helps.

    Best regards,
    Erjan Gavalji
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top