Im uploading different images to my Firebase storage using the same file name, which will overwrite the old image with a new one each time. I have verified in my Firebase storage that new images are being uploaded and saved to the same filename, but the Image component in my app keeps showing the oldest image. I’m assuming this image has been cached in the app, but I cant find a way to clear that cache. The ‘Uncache File’ flow isn’t doing anything (i explicitly set the download URL to the image file correctly).
Im wondering if anyone else has run into this and if it’s a bug.
Yes,I saw this too. I decided to always use different file names and delete the old files.
Its not in the browser cache - I tried incognito tabs and the old image is still displayed. Its quite confusing for a while when it seems like changes are not being applied.
I can´t be sure that the error persists beyond the appgyver preview. I suspect it won´t be there in a compiled app, as there is no where for the image to be stored?
I need my user’s profile pictures to change and be consistent everywhere they appear, which would occur if they all reference the same URL filename. If I change filenames then they would have multiple pictures of themselves throughout my app, for example their chat board avatars that appear in their posts would be different from one another if the user changed their profile picture because they would be referencing old image filenames.
That makes sense. So I´m guessing the image is saved as a predictable string based on their username / id etc. But how about adding a field into their data record with their image filename and making it random, that way each time you update an image you could simply update their user record, and nothing would ever point to the old image?
Are you seeing this on a compiled app as well as preview? I did my workaround before I got to the stage of doing real builds, so only ever saw it on preview.
I just noticed this on preview app. Yes I’m just setting the filename to their user-ID.jpg
I’ll come up with some kind of work around if they can’t fix this.
I’ve had so many issues with file caching.
In your case, could the image path for a user’s images be a variable path that is updated when the new file is cached to a new path?
I need the path to remain the same regardless of the image. There are various places in my app where a user profile image is displayed - a chat board, a friends list, a direct message, and all these are stored in different places in the database. For example, when a user posts a chat message then a “snapshot” of his/her info (name, picture, message, etc…) is stored as a message object which gets saved in the databse. When you add a someone to your friends list, then a “snapshot” of their info (name, picture) gets stored in a friends list variable, so if when these snapshots are taken they all have different image paths then they will display different pictures.
Would the ‘download files’ component work? It saves a file with a specified name…
When updating the image, I wonder if you deleted the old image and downloaded the new one using the same name, whether the same path would work…
What is most strange is the old image only stays cached in the image components themselves that had the old images. So if a user creates a new message post the new image is correct. Its a glitch related to the image component themselves it seems.
Im just going to create a bug tracker ticket for it and hope.
Seems like uncache still doesn’t work.
My work around CACHE (pass the path) > MOVE_RENAME FILE (add timestamp to the name of the file) then assign to variable.