Open yashnarkhedkar opened 1 year ago
same problem for me. Not a big issue, but I'm curious how to fix it
@yashnarkhedkar @tynoschuck
Inside utils/index.js update the downloadImage function
export async function downloadImage(_id, photo) {
const securePhotoUrl = photo.replace('http://', 'https://');
const imageBlob = await fetch(securePhotoUrl)
.then((response) => response.arrayBuffer())
.then((buffer) => new Blob([buffer], { type: "image/jpg" }));
const url = URL.createObjectURL(imageBlob)
FileSaver.saveAs(url, `download-${_id}.jpg`);
}
This worked for me.
Hi there, When I run my app locally file saver working normally it download image to download folder. but I hosted website using netlify then when I click download button image opening in new tab what should I do?? please help Hosted website My Repo