HTML File Upload is used to show the list of all file, when a user click on browse button A form in an HTML (web page) contain an input element with type="file". This involve one or more files into the submission of form. The file are stored into hard disk of the web server, that is why file input is called" file upload".
Understand with Example
The Tutorial illustrate an example from HTML File Upload. In this code, we create a html page which show you a
<input type="text"> :In HTML,the type of control used in form is defined by the Type attribute. The default value of Type is text, which enables a a single-line text input field. The size attribute define the number of characters in text field.
<input type="file">:The <input type="file> is used to create a upload file with a text box and the browse button. The method attribute used in form must be set to post.
when a user enter the name of file in the specified textbox or click on browse button to search the specific folder and click on a submit button, the filename is submitted.
<form action="fileinsert.html" method="post">
Enter Your Text (Optional):<br>
<input type="text" name="textwrite" size="15">
Specify your File:<br>
<input type="file" name="datasize" size="30">
<input type="submit" value="Send">
Output on the browser is displayed as
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.