As I know, we can do this, as shown below, but still the dialog contains all file types:
<input type="file" name="pic" id="pic" accept="image/gif, image/jpeg" />
But you can limit the file upload to the wrong type using Jquery / Javascript, I think, before sending the file to the server, checking the extension.
source share