JSFiddle - React, Tailwind, and code Playground
HTML
<input type='file' name='aname' id='bid' data-whatever='whatever'></input>
JavaScript
var input = $("input[type=file]");
var inputHTML = input.clone().wrapAll("<div>").parent().html();
var newinputHTML = inputHTML.replace(/type="file"/, 'type="input"');
input.replaceWith(newinputHTML);