JSFiddle - React, Tailwind, and code Playground

HTML

<input type="file" id="file"/>

JavaScript

(function(){
    var file = document.getElementById('file');
    file.click();
})();