JSFiddle - React, Tailwind, and code Playground
HTML
<input name="file" type="file" />
JavaScript
$('input[name=file]').change(function() {
alert($(this).val());
});
<input name="file" type="file" />
$('input[name=file]').change(function() {
alert($(this).val());
});