By using the file type on the input element:
<form action="..." method="POST" enctype="multipart/form-data">
...
<p>Upload documents: </p>
<input type="file" name="document" accept=".doc,.docx,.pdf" multiple>
...
</form>
The accept attribute will specify the types of files that can be loaded into the form, and the multiple attribute will enable the possibility of uploading multiple files at once.
It is important for the form to have a POST method and "multipart/form-data" as encoding type.