JSFiddle - React, Tailwind, and code Playground

HTML

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

JavaScript

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