title: AJAX DJango Get files from multiple file field
body: <p>I'm doing multiple file upload with AJAX and DJango and I have problem.
  How to get files from field input and push them to <code>data</code> ?
  HTML:</p>
  
  <pre><code>&lt;form id="add_photos" method="post" action="" enctype="multipart/form-data"&gt;
  
    {% csrf_token %}
    &lt;input type="file" name="file[]" multiple id="files"&gt;
  
    &lt;input type="submit" name="submit" value="Submit" /&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function formSubmit(e) {
        e.preventDefault();
  
        $.ajax({
          method: 'POST',
          data: form.serialize(),
          url: '.',
          success: function(data) {
            console.log(data);
          },
          error: function (data) {
            console.log(data);
          }
        });
      }
  </code></pre>