title: Ajax file upload Vue.js
body: <p>I am trying to upload a file via Ajax using Vue.js - however, the server keeps responding saying that the file needs to be an image (It works when it isn't using ajax). The setup I have is as follows:</p>
  
  <pre><code>&lt;input type="file" name="avatar" v-model="profileFormData.avatar"&gt;
  </code></pre>
  
  <p>And my data is:</p>
  
  <pre><code>profileFormData: {
              "name": '',
              "email": '',
              "avatar": '',
          },
  </code></pre>
  
  <p>Is there something specific I need to do for file uploads?</p>