HTML - Upload form

The upload is a very practical form to allow the users to put photos, films or any other kind of files on the server.

To create an upload form we will only have to establish the file value to the <input type=" "> tag.

<input type="file" />


Upload - Max file size

To limit the size of some of the files uploaded on the webhosting server we will use a hidden field.

<input type="hidden" name="MAX_FILE_SIZE" value="500" />

< input type="file" />

 

The value chosen in the example above was 500. That means that files over 500 kb will not be allowed for upload. A value of 100 would mean 100kb, one of 1000 would mean 1000kb (1MB) and so on.