79694721

Date: 2025-07-08 19:17:32
Score: 0.5
Natty:
Report link

the getFilePreview function when used with async returns a promise i was also stuck with the same problem for some time but after goofing around a bit i learned that You don't need an async function to get the url u can just call the function and it returns the url

 getFilePreview(fileID) {
        try {
            return this.bucket.getFilePreview(conf.appwriteBucketId, fileID);
        } catch (error) {
            console.log("appwrite error:: getFilePreview::", error);
            return null;
        }
    }
    
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Tanishq