1fetch(API_URL)
2 .then(resp => resp.data.blob())
3 .then(blob => {
4 const url = URL.createObjectURL(blob);
5 document.getElementById("preview").src = url;
6 });
7
1axios.get(API_URL, { responseType: "blob" }).then(resp => {
2 const url = URL.createObjectURL(resp.data);
3 document.getElementById("preview").src = url;
4});
5