Limiting file size of <input type=file>

Results 1 to 2 of 2

Thread: Limiting file size of <input type=file>

  1. #1
    Join Date
    Dec 1969

    Default Limiting file size of <input type=file>

    I&#039;m using a webbot to validate the fields on my form and I&#039;d like to use it to limit the size of the files users are allowed to upload. Does anyone know of a way to do this?<BR><BR>&#060;!--webbot bot="Validation" B-Value-Required="TRUE" I-Minimum-Length="5" --&#062;<BR><BR>I was hoping to set some parameter like B-File-Size to &#060; 200kb, if such a thing exists.

  2. #2
    Join Date
    Dec 1969

    Default No idea how with webbot...

    ...but it&#039;s easy enough to do in the ASP coding.<BR><BR>First of all, note that the *client* side is not and can not be aware of the file size, so you won&#039;t know until the form is actuall posted what the size is. And you&#039;ll only know it on the server.<BR><BR>So on the server you can simply reject files that are too big.<BR><BR>How you do that depends on what file upload component you are using on the server.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts