HI я не могу загрузить файл, используя метод ax ios post, vuejs. Я пробовал также с новой Formdata (), но он отправлял только пустые formdata () или formdata (0). если я console.log (info) все данные есть.
var info = new FormData();
info['title'] = this.title;
info['category_title'] = this.category;
info['from_time'] = this.from_time;
info['to_time'] = this.to_time;
info['releasing_date'] = this.releasing_date;
info['audio_file'] = this.audio_file;
// You should have a server side REST API
axios.post(window.restRoot + 'upload_live', info, {
headers: {
'Content-Type': 'multipart/form-data'
}
}).then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});