developit / developit/redaxios
post multiple files not working as expected
- Dominant language
- JavaScript
- Stars
- 4.9k
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
hi,
when posting files via axios everything works as expected, once i switch to redaxios, the data were not send and serialized same way..
```
```
```
sync(e) {
e.preventDefault();
this.files2upl = e.target.files;
}
/*
Submits files to the server
*/
submitFiles() {
/* Initialize the form data */
let formData = new FormData();
/*
Iteate over any file sent over appending the files
to the form data.
*/
for (var i = 0; i < this.files2upl.length; i++) {
let file = this.files2upl[i];
this.log(file.size + ' '+file.name);
formData.append("files", file, file.name);
}
//redaxios didnt upload anything
//this.axios
this.redaxios
.post(this.vars.servurl + "/file/uploadfiles2", formData, {
headers: {
"content-type": "multipart/form-data",
token: this.vars.token
}
})
}
```
Contributor guide
Assessment
This issue has not been assessed yet.