<input type="file" name="fileSubmission">
File inputs allow users to select a file from their local filesystem for use with the current page. If used in conjunction with a form element, they can be used to allow users to upload files to a server (for more info see Uploading Files).
The following example allows users to use the file input to select a file from their filesystem and upload that file to a script on the server named upload_file.php.
<form action="/?originalUrl=https%3A%2F%2Friptutorial.com%2F%26quot%3Bupload_file.php%26quot%3B%2520method%3D%26quot%3Bpost%26quot%3B%2520enctype%3D%26quot%3Bmultipart%2Fform-data%26quot%3B%26gt%3B%2520%2520%2520%2520Select%2520file%2520to%2520upload%3A%2520%2520%2520%2520%26lt%3Binput%2520type%3D%26quot%3Bfile%26quot%3B%2520name%3D%26quot%3BfileSubmission%26quot%3B%2520id%3D%26quot%3BfileSubmission%26quot%3B%26gt%3B%2520%2520%2520%2520%26lt%3Binput%2520type%3D%26quot%3Bsubmit%26quot%3B%2520value%3D%26quot%3BUpload%2520your%2520file%26quot%3B%2520name%3D%26quot%3Bsubmit%26quot%3B%26gt%3B%26lt%3B%2Fform%26gt%3B%253C%2Fcode">
Multiple files
Adding the multiple attribute the user will be able to select more than one file:
<input type="file" name="fileSubmission" id="fileSubmission" multiple>
Accept Files
Accept attribute specifies the types of files that user can select. E.g. .png, .gif, .jpeg.
<input type="file" name="fileSubmission" accept="image/x-png,image/gif,image/jpeg" />