Create multiple input type=“file” elements with their corresponding value (FileList) according to the main input type=“file” (multiple) element
I have this code where I loop unto files from a multiple input file type $(function(){ $('#main-input').change(function(){ var files = $('#main-input')[0].files; for (var i = 0, f; f = files[i]; i++) { alert(files[i].name); } }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <input type="file" id="main-input" multiple> What I'm trying to achieve, is clone the main input (#main-input) and gives a value (file) base on the loop files. Any ideas, suggestions please? or is this even possible? Yes, the requirement is possible. You will need to create a