allow only pdf file upload html code example
Example 1: input type file allow only pdf
<input type="file" id="test" name="test" accept=".pdf,.doc"/>
Example 2:
<input name="userfile" type="file" accept="application/pdf, application/vnd.ms-excel" />
Example 3: allow pdf upload in file input
<input type="file" name="upload" accept="application/pdf,application/vnd.ms-excel" />