axios({
method:'post',
url:'/api/reportFuel/' + this.form.id,
responseType:'arraybuffer',
data: this.report
})
.then(function(response) {
let blob = new Blob([response.data], { type: 'application/pdf' } );
let link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = 'Report.pdf';
link.click();
});
No comments:
Post a Comment