html input type file only pdf code example
Example: how to ensure only pdf files are selected
<input type="file" name="upload" accept="application/pdf,application/vnd.ms-excel" />
<input type="file" name="upload" accept="application/pdf,application/vnd.ms-excel" />