I was thinking that if i deleted a file from appwrite storage(the file being a photo), automatically the file preview would no longer be showing the image since it has been deleted from the storage. But as I tried to implement it , the delete function was successful but the photo was sill available on the application. I want to confirm where the issue is coming from .
storage.getFilePreview("BUCKET_ID",fileID) This is the function I used to preview the image, but now I have deleted the file, I am confused as to why I am still seeing the image. Building this project with React. Thank you
It could be that the image is still cached in the browser. Can clear your cache and check again?
Would that work? I don't think I would want to tell a user to clear their cache if they wanted to delete a photo. From my elements tab in the developer tools, it still shows the source of the image from appwrite cloud storage. But I already deleted it.
The cache gets deleted after some time. That's how browsers work
Also, you should remove from UI side the photo, that way the client knows it has been deleted
Recommended threads
- execution failed
When executing an appwrite function, I'm getting a 500 error, but I don't see it in executions. This issue appeared today. Here's the appwrite function ID: 68b4...
- How to use appwrite types
I am using appwrite types --language ts ./types to generate the types yielding something like: ``` import type { Models } from 'node-appwrite'; // This file i...
- Dynamic Roles
I tried to store a row with this permissions: permissions.push( Permission.read(Role.users("verified")), Permission.write(Role.label(`c-${calend...