# Supabase delete/replace workflow

**URL:** <https://community.weweb.io/t/supabase-delete-replace-workflow/19730>\
**Category:** How do I?\
**Tags:** supabase\
**Created:** [August 20, 2025, 11:33pm UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730 "2025-08-20T23:33:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jefeOliveira](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jefeoliveira/32/13256_2.png) [@jefeOliveira](https://community.weweb.io/u/jefeOliveira)\
**Post date:** [August 20, 2025, 11:33pm UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730/1 "2025-08-20T23:33:59Z")

</div>

Can someone show me an exemple of a workflow that either replaces a image file in supabase or delete properly? I tried both and both didnt work at all, and yes ive checked all RLS and nothing worked for me..

---

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [August 20, 2025, 11:46pm UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730/2 "2025-08-20T23:46:02Z")

</div>

here is an upsert. the event is from the standard file uploader,

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/11c1f17e36b55a5f54b1efa2f45a3a9c74f7f790.png)

here is the path

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/92c69ee9ebd52723ed49bad34d557053cb0e2233.png)  
heres the supabase files.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/3/3a4b963de56342425475ae00e52e3d305bc11972.png)

something to keep in mind is having the file type in the name of the file

---

<div class="post-metadata">

**Author:** ![jefeOliveira](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jefeoliveira/32/13256_2.png) [@jefeOliveira](https://community.weweb.io/u/jefeOliveira)\
**Post date:** [August 21, 2025, 12:01am UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730/3 "2025-08-21T00:01:41Z")

</div>

thank you for your reply, but i need a REPLACE / DELETE example, not a upload, upload i managed to make it work just fine

---

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [August 21, 2025, 12:15am UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730/4 "2025-08-21T00:15:59Z")

</div>

upsert replaces if you give the same file name. Interestingly I just tested a delete that I was going to show you and it didn’t work might have been a mistake on my part as I was also deleting the row that held the reference to it. But I believe it was working in the past

---

<div class="post-metadata">

**Author:** ![jefeOliveira](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jefeoliveira/32/13256_2.png) [@jefeOliveira](https://community.weweb.io/u/jefeOliveira)\
**Post date:** [August 21, 2025, 12:25am UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730/5 "2025-08-21T00:25:08Z")

</div>

Ohh, got it, i will give it a try, thank you

---

<div class="post-metadata">

**Author:** ![jefeOliveira](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jefeoliveira/32/13256_2.png) [@jefeOliveira](https://community.weweb.io/u/jefeOliveira)\
**Post date:** [August 21, 2025, 12:45am UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730/6 "2025-08-21T00:45:52Z")

</div>

ok, im having issues with the path, this is what im sending `“https://jrkwrxfvcbgzlkituekv.supabase.co/storage/v1/object/public/logos/logos_200825-3756.jpg”` but on supabase it is creating a http folder inside a folder inside a folder

i just need to upload it to my bucket root, just a image

---

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [August 21, 2025, 12:55am UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730/7 "2025-08-21T00:55:12Z")

</div>

the “/” is telling it its a folder if just set the path to logos\_200825-3756.jpg it wont have the folders

---

<div class="post-metadata">

**Author:** ![jefeOliveira](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jefeoliveira/32/13256_2.png) [@jefeOliveira](https://community.weweb.io/u/jefeOliveira)\
**Post date:** [August 21, 2025, 1:18am UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730/8 "2025-08-21T01:18:15Z")

</div>

Weird, now my bucket image is the new replaced one, but in the url still shows my previous image..

---

<div class="post-metadata">

**Author:** ![jefeOliveira](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jefeoliveira/32/13256_2.png) [@jefeOliveira](https://community.weweb.io/u/jefeOliveira)\
**Post date:** [August 21, 2025, 12:32pm UTC](https://community.weweb.io/t/supabase-delete-replace-workflow/19730/9 "2025-08-21T12:32:21Z")

</div>

@sam1 , it seems to be working now, but my image both on front end and on my bucket take ages to update properly, is that a cache issue?
