решил проблему, подсмотрел
Здесь, необходимо изименить:
axios.post('http://127.0.0.1:8000/api/create_letter_to_the_debtor', JSON.stringify(body))
.then(
function (response) {
let blob = new Blob([response.data],)
let link = document.createElement('a')
link.href = window.URL.createObjectURL(blob)
link.download = 'Letters.zip'
link.click()})
.catch(e => {
console.log(e.response)
});
На:
axios({
method: 'POST',
url:'http://127.0.0.1:8000/api/create_letter_to_the_debtor',
data: JSON.stringify(body),
responseType: 'blob',
})
.then( (response) => {
// response => console.log(response))
console.log(response)
let blob = new Blob([response.data], { type: 'application/zip' })
let link = document.createElement('a')
link.href = window.URL.createObjectURL(blob)
document.body.appendChild(link);
link.click()
document.body.removeChild(link);
})