title: How do I upload a file from Axios to Django?
body: <p>I'm switching from Jquery AJAX to react-dropzone &amp; Axios, I'd like to upload a file to my Django server, I have no issue posting a blob url of the image on the server but I want to get it under <code>request.FILES</code> but I am getting an empty queryset.</p>
  
  <pre><code>request.FILES : &lt;MultiValueDict: {}&gt;  &lt;!--- empty
  request.POST  : &lt;QueryDict: {}&gt;       &lt;!--- able to get a blob url
  </code></pre>
  
  <hr>
  
  <p>Here's what my axios configuration looks like : </p>
  
  <pre><code>const temporaryURL = URL.createObjectURL(step3.drop[0]);
  
  var fd = new FormData();
  fd.append('image', temporaryURL);
  
  axios({
    method: 'post',
    url: SITE_DOMAIN_NAME + '/business-card/collect/',
    data: fd,
    headers: {
      "X-CSRFToken": CSRF_TOKEN, 
      "content-type": "application/x-www-form-urlencoded"
    }
  }).then(function (response) {
    console.log(response)
    URL.revokeObjectURL(temporaryURL);
  }).catch(function (error) {
    console.log(error)
  });
  </code></pre>
  
  <p>I am receiving the file on a classBasedView on POST request.</p>
  
  <p>How can I upload the file? Where am I wrong?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I also tried "application/form-data", doesn't solve the problem</p>