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:
<input type="file" name="avatar" v-model="profileFormData.avatar">
And my data is:
profileFormData: {
"name": '',
"email": '',
"avatar": '',
},
Is there something specific I need to do for file uploads?