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
- Bug: Cloud Function On Schedule Didn't R...
Heya I have a cloud function with this cron `0 17 * * *` to run at 9AM PT every day. I have not touched this since I set it up, and it has been working fine s...
- functions
Code for function not being created in Github. Permissions are set correctly, repository is created, however no code is in the created repository. Just trying...
- Error 400: redirect_uri_mismatch
Hi team, Google OAuth was working fine with our Appwrite Cloud setup until yesterday. We did not change any configuration in Appwrite, Google Cloud, or our cod...