accept only pdf input file in html code example
Example:
<input name="userfile" type="file" accept="application/pdf, application/vnd.ms-excel" />
<input name="userfile" type="file" accept="application/pdf, application/vnd.ms-excel" />