What is your file size limit(max_post_size)? That could be blocking the blob content if it exceeds the max.
Feb 20, 2018
8
Level 1
Blob upload with axios fail in Laravel
I have been trying to upload files using axios, the payload on the console network tab looks great but the files appear to be empty on the Laravel side.
Below is the response I get from $request->all()
"feedback": {
"description": "there is not a friend",
"displays": [
"Lagos -\r\n Ikoyi"
],
"messages": [
{
"text": "this is an unexpected result",
"startTime": "2018-02-20T11:11:01.404Z",
"endTime": "2018-02-20T11:11:01.411Z",
"image": {},
"video": {}
}
]
}
}
Below is the send method:
```submit() {
const data = new FormData();
data.append('description', this.description);
for (let index in this.boards) {
if (this.boards.hasOwnProperty(index)) {
data.append('displays[' + index + ']', this.boards[index]);
}
}
for (let index in this.messages) {
if (this.messages.hasOwnProperty(index)) {
data.append('messages[' + index + '][text]', this.messages[index].text);
data.append('messages[' + index + '][image]', this.messages[index].imageBlob);
data.append('messages[' + index + '][video]', this.messages[index].videoBlob);
data.append('messages[' + index + '][startTime]', this.messages[index].startTime);
data.append('messages[' + index + '][endTime]', this.messages[index].endTime);
}
}
axios.post('/campaign/', data, {
headers: {
'accept': 'application/json',
'Accept-Language': 'en-US,en;q=0.8',
'Content-Type': `multipart/form-data; boundary=${data._boundary}`,
}
}).then(response => {
this.feedback = response.data;
}).catch(error=>{
this.errors = error
});
}
Please, how can I work around that?
Please or to participate in this conversation.