Upload files in an array differently in jquery ajax
<p>I have this html</p>

<pre><code>&lt;input type="file" name="[]" multiple /&gt;
</code></pre>

<p>Now I want to upload each of the files separately but I am really stuck.</p>

<pre><code>$('input:file').on('change', function(){
    allFiles = $(this)[0].files;
    for(var i = 0; allFiles.length &gt; i; i++){
        eachFile = allFiles[i];
        $.ajax({
            url: link,
            type: "POST",
            data: new FormData(eachFile),
            contentType: false,
            processData:false,
            success: function(result){
                console.log(result);
            }
        })
    }
})
</code></pre>

<p>But I don't seem to work. I use the above <code>ajax</code> request to upload files in an array but I want to upload them differently. Any suggestion on how to achieve this?</p>

<p>This is not a duplicate to the supposed duplicate question. I want to upload multiple files separately to the server but the question marked wants to upload multiple files at once. I use my above code to upload multiple files to the server at once an it works fine. So why should I as what I already have a solution to?</p>