JSFiddle - React, Tailwind, and code Playground
HTML
<input type='file' id='godzilla' style='display:normal' />
<button onclick='document.getElementById("godzilla").click()'>mech-godzilla</button>
JavaScript
var godzilla = document.getElementById('godzilla')
godzilla.onclick = charge
function charge()
{
document.body.onfocus = roar
console.log('chargin')
}
function roar()
{
if(godzilla.value.length) alert('ROAR! FILES!')
else alert('*empty wheeze*')
document.body.onfocus = null
console.log('depleted')
}