When I download the image from storage it shows unknowntime in browser while downloading
TypeScript
let downloadImage = async () => {
console.log("Downloading image");
let result = await authservice.downloadImage(post?.imageid);
console.log(result);
const link = document.createElement("a");
link.href = result.href;
link.download = "image.jpg"; // Set the filename for the downloaded image
// Programmatically click the link to trigger the download
link.click();
};```
TL;DR
Issue: Developers are encountering an unknown download time when downloading an image from storage. The download progress appears as 'unknown' in the browser.
Solution: The function responsible for downloading the image should be modified to include progress tracking in order to display the correct download time in the browser.TypeScript
async downloadImage(id){
try {
let file = await this.storage.getFileDownload(
conf.BUCKET_ID,
id
)
return file
} catch (error) {
console.log(error);
throw error.message
}
}
}```
Recommended threads
- Domain Verification Failed - Fastly Conf...
I am trying to add my subdomain api.getmyself.app to my Custom Domain, but I keep getting the error: Domain 'getmyself.app' is owned by another customer I have...
- Data not loading at the frontend
My App that has been working for weeks, ain't loading anything at the frontend anymore. I thought maybe the API key expired but it's not the case. Users are log...
- Do I need to upgrade my Appwrite plan?
So i am making a file hosting & sharing platform (voltzy.lol) and i am expecting approx 5-8 million visit per month and over 30 million uploads per month do i n...