How to restrict file type (e.g. .pem, .cer) using in HTML5. The accept tag does not serve the purpose fully, as I can type some other file type and the file gets uploaded. The field is of input type "file". How to restrict file type (e.g. .pem, .cer) usi