JSFiddle - React, Tailwind, and code Playground

HTML

<input class='up-pic' type='file' name='pic' accept='image/*'>

JavaScript

$(".up-pic").change(function() {
   $(this).after("<input class='up-pic' type='file' name='pic' accept='image/*'>");
});