Check out example codes for "input limit file type html". It will help you in understanding the concepts better.
Code Example 1
<!-- (IE 10+, Edge (EdgeHTML), Edge (Chromium), Chrome, Firefox 42+) -->
<input type="file" accept=".jpg,.png,.pdf" />
Learn ReactJs, React Native from akashmittal.com