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
- Function Go module undefined
Attached image, why module is undefine, also when I'm running `appwrite run function`, it still undefine, why?
- Unable to deploy site
I am on a new project where i want to deploy a new site, but what ever i'am trying - i get this error, and thats if i manually deploy with gz file 5.4kb or thro...
- Unexpected site limit
i am getting no. of site limits eve though i dont have any site deployed currently