JSFiddle - React, Tailwind, and code Playground
HTML
<input type='file' onchange='get_info()' id = 'the_file' />
JavaScript
get_info = function(){
the_file = document.getElementById('the_file');
console.log(the_file.files[0]);
}
<input type='file' onchange='get_info()' id = 'the_file' />
get_info = function(){
the_file = document.getElementById('the_file');
console.log(the_file.files[0]);
}