JSFiddle - React, Tailwind, and code Playground

HTML

<input type="file" name="" id="fileChooserID">
<a href="#">Click</a>

JavaScript

$("a").on("click", function(){
    alert(document.getElementById('fileChooserID').files[0].type)
})