JSFiddle - React, Tailwind, and code Playground
by moob
HTML
<form>
<button id="a">Choose File</button> <span id="c">...</span> <button id="d">submit</button>
</form>
<form style="display:none">
<input id="b" name="file b" type="file" />
</form>
JavaScript
$(function(){
$("#a").on("click", function(e){
e.preventDefault();
$("#b").trigger("click");
return false;
});
$("#b").on("change", function(e){
console.log($(this));
$("#c").text($("#b").val());
})
$("#d").on("click", function(e){
$("#b").submit();
})
})