S
Supabase2mo ago
Storm

Updating/Upload with upsert not replacing image preview (?) but replacing file itself

Not sure if I'm missing something or it's a supabase thing but when I go to update an image in my storage bucket, it updates the URL and all so when I download it's the new image, but if I use the url in an <Image> component on react native it comes as the very first image when it was first uploaded, and not the updated one. Same for the preview of the image in the bucket in the folder it's in. But downloading it has it changed just fine. Not sure what it is.
4 Replies
Storm
StormOP2mo ago
could it be that the public url is not updating? It seems to be working though cuz going to the public url shows the new image. Not sure if that's what shown when used or what so I did more testing or whatever, after uploading the image, whenever I call it from the public URL right after it takes time for it to update but if I download from the bucket it is updated. Is there anyway to make it faster?
garyaustin
garyaustin2mo ago
You would need to bust the caching.
garyaustin
garyaustin2mo ago
Smart CDN | Supabase Docs
Learn how Supabase Storage caches objects with a CDN.
Storm
StormOP2mo ago
I turned each thing into it's own folder with dates so it looks fixed now, thanks

Did you find this page helpful?