JSFiddle - React, Tailwind, and code Playground
by xmarcos
HTML
<input name="avatarfile" type="file" id="uploadbutton" />
<button>Trigger</button>
JavaScript
console.log($('button'));
$('button').click(function(){
$('input[type="file"]').trigger('click');
}).trigger('click');