JSFiddle - React, Tailwind, and code Playground

HTML

<form method="POST" enctype="multipart/form-data" id="theForm"> 
     <label class="dynamicInput">
          Foto 0<input type="file" name="myInputs1">
     </label>
    <br/>
</form>

<br/>

<h2 id="addButton">Add Field</h2>

CSS

#addButton { margin-top: 20px; cursor: hand; cursor: pointer; }

JavaScript

var counter = 1;
var limit = 10;


$("#addButton").click(function(){
    htmlString = '<label class="dynamicInput">Foto'+ counter +'<input type="file" name="myInputs '+ counter + '"></label><br/>'
        
     if(limit > counter)
    $("#theForm").append(htmlString);
    counter++;
});