i want to add multiple parameter in my axios post. how i can do it?
here what i try
axios.post('/select-files', this.$data.single, formData, config)
.then((response) => {
alert('Data Single Successfull Inserted.')
console.log(response);
})
my current code only return data from this.$data.single
.
if i change code like this formData, this.$data.single, config
, then my code will only return data from formData
formdata
is return this data
formData.append('image', this.image);
this.$data.single
return this data
data() {
return {
files: [],
errors: [],
artistname: [],
single: {},
image: '',
success: '',
artist: [],
showinput: [],
searchText: '',
items: [],
lastSelectItem: {}
}
},
and config
is
const config = {
headers: { 'content-type': 'multipart/form-data' }
}
this is not my full code.