
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
- File tokens regenerate each page reload
Hello, on appwrite 1.7.4, when I create a file token via the API Tokens(appwriteAdminClient)#createFileToken I get a secret, then when I check in the console t...
- CSV Import Shows Success but Data Not Ap...
I tried importing a CSV file into my PRODUCTS collection. The dashboard shows the message “Import to PRODUCTS completed successfully,” but no data appears in th...
- Console create row ui not passing ID.uni...
I'm getting an error saying the id is already used but it should be created with ID.unique() it doesn't seem to be reading the row ID field at all. I can't get ...
