
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
- phantom relationships appear on parent c...
i have this bug were my past deleted collection apears as relationship to my parent collection. when i try to delete that relationship from parent it gives me e...
- Attributes Problem - Cloud
I am not able to see the attribute columns and their context on cloud. Can you help?
- Authorization header not working in Appw...
I have an Appwrite function that takes a custom bearer token as authentication. The function works fine locally when I test it with `appwrite run functions`, bu...
