как передать изображение в контроллер, в консоле выдает название файла, но в контроллере я принимаю null
<input type="file" name="image" @change="loadBanner">
import axios from 'axios'
export default {
el: '#add_catalog_link',
data: function(){
return {
max: 160,
paysystems: [],
showpay: false,
activec: 0,
sUsd: '',
form: {
url: '',
urlbanner: '',
image: '',
typebanner: 1,
politic: false,
days: 5,
cost: 0
}
}
},
computed: {
costOrder: function() {
var result = 0,
countDays = this.form.days;
if(this.form.typebanner === 1) result = countDays * 29; else result = countDays * 19;
return result
},
usd(){
return this.sUsd
},
},
mounted() {
this.getPaySystems()
this.paySystemCost()
this.getUsd()
},
methods: {
loadBanner(event) {
this.image = event.target.files[0].name;
console.log(event.target.files[0].name);
console.log(this.image);
},
saveLinkToCatalog(pay_id){
axios.post('/banners/add-user',{pid:pay_id,url:this.form.url,urlbanner:this.form.urlbanner,typebanner:this.form.typebanner,days:this.form.days,cost:this.costOrder,image:this.form.image})
.then((response) => {
if (response.data.error === 0){
toast.fire({
type: 'success',
title: response.data.message
})
}else{
toast.fire({
type: 'error',
title: response.data.message
})
}
})
.catch(error => {});
}
}
}