I'm trying to use input file with multiple attribute and to have the formData split so I would have a formData isnatce for each file in the multiple file element.
HTML
<input type="file" name="file" multiple></label>
JS
new FormData(formElement) // <--- Need to have this for each file selected
I need this because I'm using Cloudinary API and they only accept one file at a time, so I need to send multiple Ajax requests and for each, I need formData instance for each of the files selected, but the problem is, FormData accepts as an argument the how form element, and I cannot separate the files.
$.ajax()for each file selected? Note, second parameter toFormData.prototype.append()should be data to be set, third parameter is file name, if anyFormDatato be instantiated only with theformwhich is the DOM form element...