Hi, I am running into a problem with the `GetPubli...
# help
t
Hi, I am running into a problem with the
GetPublicUrl()
method. What happens: 1. I uploaded an image to a bucket. 2. I displayed the image using getPublicUrl(), the correct image showed up. 3. I uploaded a new image (with upsert: true) with the same name, Succesful. 4. I tried to display the new image with getPublicUrl(), but it keeps returning the old image.. The image is updated when I check app.supabase.io, but when I request the public url from there, it gives me a supabase.in url instead of supabase.co. I tried several thing including cache control, but can't figure out why my app keeps displaying the old image. Anyone recognises this or knows what I am doing wrong? Thanks a lot! PS: I see a similar case was reported in this channel 3 hours ago by @User
g
When you re-upload the image, the old image is still cached based on cache time by browsers and probably cdn's... If you go to the UI you should see the changed image, they add a "cache busting" string to the url like ?t=2022-02-15T21:20:58.051Z
t
Thanks! That's probably what happens. Added an updated query to my image url and now it updates.