-
-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Labels
Description
Hello there,
I am trying to use this awesome plugin to upload a PDF file. I have created a model for this:
import Model from './Model';
export default class JobApplication extends Model {
resource() {
return 'v2/job_applications';
}
}
Then, I call the model within the .vue
file like that:
...
import JobApplication from "./../models/JobApplication";
...
async onSubmit() {
let job = new JobApplication({
first_name,
last_name,
email,
mobile_phone,
resume: this.$refs.resume.files[0]
});
await job
.save()
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error.response);
});
}
...
The problem is that the POST request fails every time I try to submit the form because of the resume field. What am I doing wrong in here? Do I have to do any extra steps? Thank you