I'm working with Vue and using axios to send request. With POST method i have a request body with many data, everything work fine except when i try to send a file with it. In the chrome dev tool i could see that the field that suppose to have a file(blob object) in it turn out to be an empty object. I have try everthing with content-header and everything but it just wont work
axios({
method : 'post',
url : 'http://localhost:1323/restricted/Profile',
headers: {
'Content-Type': `multipart/form-data;`,
},
data : {
name: this.name,
pass: this.pass,
email: this.email,
fullname : this.fullname,
isadmin : this.isAdmin,
bdate : new Date(this.birthDate),
startworkday : new Date(this.workDate),
gender : this.gender,
address : this.address,
hometown : this.hometown,
gradschool : this.gradschool,
phonenum : this.phonenum,
cv : this.cv,
nominator : this.nominator,
salary : this.salary,
},
})
.then((respone) => {
console.log(respone.data);
});