JSFiddle - React, Tailwind, and code Playground
HTML
<input type="file" onchange="add(this); this.onchange=null;">
JavaScript
function add(elem) {
var input = document.createElement("input");
input.type = "file";
input.onchange = inputOnChange;
elem.parentNode.insertBefore(input, elem.nextSibling);
}
function inputOnChange() {
add(this);
this.onchange = null;
}