let formData = new FormData();
formData.append('file', this.example.path.to.my.file)
axios.post('path/to/laravel', formData, {
'headers': {
'Content-Type': 'multipart/form-data'
}
}).then((response) => {
// do somethink
}).catch((error) => {
// do somethink
})
{
file: "binary"
}
{
file: "binary",
name: 'Ivan',
surname: 'Ivanov'
}
let formData = new FormData();
formData.append('file', this.my.file);
formData.append('name', 'Ivan');
formData.append('surname', 'Ivanov');
axios.post('my/server', formData, {
'headers': {
...
<div class="col-md-4" v-for="item in genres" :key="item.id">
<Genre :id="item.id" :name="item.name"></Genre>
</div>