
I am trying to get image preview but I get an empty object.
TypeScript
export const getFile = async (fileId) => {
return await storage.getFilePreview(
process.env.BUCKET_ID,
fileId
)
}
this is how i am getting the image preview. also can u pls tell me how can i get the blob as well.
i read the documentation and also used help from AI, but no good..
thx
TL;DR
Issue: Developer is trying to get an image preview using the provided code but it returns an empty object. They are also requesting information on how to get the blob.
Solution: The issue could be related to how `storage.getFilePreview()` is handling the file. Check the functionality and ensure the correct fileId and BUCKET_ID are being used. To get the blob, consider adapting the provided code to retrieve the blob directly or explore additional methods within the storage API.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...
