Reputation: 1794
I'm using Glide to download image stored in Firebase like the example in the documentation:
Glide.with(this /* context */)
.using(new FirebaseImageLoader())
.load(storageReference)
.into(imageView);
This works pretty well. And if I define a restriction to forbid read File access (From the Firebase Security rule console) the file is not downloaded (I log a Storage Exception ("user not allowed").
The problem occurs when access Rules change from public to private:
The first time I allow read access on the File. Glide will download the image file and put it in his cache.
Then from the Firebase console I change the security rules to deny read File.
Since Glide read the file from his cache the read restriction is not efficient and the image can be displayed on the device.
So how can I deny the read access (or delete the cached file) when the security rules change like this?
Upvotes: 0
Views: 666
Reputation: 598740
There is no way to prevent a device from displaying an image that it has previously cached. You'll have to assume that if someone has gotten a copy of a file, they can hang on to it for as long as they see fit.
Upvotes: 3