0π
It was just a case of updating my axios call to include the response type:
GetAllAssetResources ({commit},assetDetailid)
{
console.log("Getting Asset Resources:" + id);
return new Promise((resolve) => {
axios({
url: CONFIG.platformEndPoints+ '/asset/downloadResources/' + id,
method: 'GET',
responseType: 'blob'})
.then( (response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'resources.zip');
document.body.appendChild(link);
link.click();
})
})
},
- [Vuejs]-[Vue warn]: Failed to mount component when using mixin with a parameter
- [Vuejs]-Vue.js remove object from list with two-way binding
Source:stackexchange.com