Answer the question
In order to leave comments, you need to log in
How to open pdf in new tab?
I get inputstream. and show in a new tab. how to check if error without blob? blob cannot take error message
Axios(url, {
method: 'GET',
responseType: 'blob'
})
.then((res) => {
const file = new Blob(
[res.data],
{type: 'application/pdf'}
);
const fileUrl = URL.createObjectURL(file);
window.open(fileUrl, "_blank");
})
.catch((e) => {
this.showNotification("error", "Отсутвствует квартирный лист");
});
Answer the question
In order to leave comments, you need to log in
There is a similar issue discussed here and possible solutions
https://github.com/axios/axios/issues/1392
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question