📅  最后修改于: 2022-03-11 14:59:23.247000             🧑  作者: Mango
let headers = {
Authorization: "token",
'Content-Type':'multipart/form-data'
};
let formData = new FormData();
for(let key in files){
formData.append('files[][file]', files[key].file, files[key].file.name)
formData.append('files[][file_type_id]', files[key].fileType)
}
axios
.post(
"/api/files",
formData,
{ headers }
)
.then(()=>{console.log('It Works')})