When I clone an input type file, It so happens that the file uploaded to the cloned input gets attached to the original input. Its as if the cloned input is representing and taking attachments for the original.
Im cloning it the following way: clonedInput = $('input[type=file]').clone(true) is it posible to clone a file input and use it independently? or is there another way to solve this.
On the dom, the user has the option to upload more than one file by clicking on a button that duplicates the first input, but the duplicate does not work because it attached the file to the original input.
The solution to the problem was to convert the html into a string with .prop("outerHTML"), then convert it back to a html element with $.parseHTML() so the dom would treat it as a brand new or fresh element.