# Uploading Multiple Files to Supabase

**URL:** <https://community.weweb.io/t/uploading-multiple-files-to-supabase/20442>\
**Category:** How do I?\
**Tags:** supabase\
**Created:** [November 28, 2025, 9:44am UTC](https://community.weweb.io/t/uploading-multiple-files-to-supabase/20442 "2025-11-28T09:44:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![emdiemeric](https://avatars.discourse-cdn.com/v4/letter/e/e9bcb4/32.png) [@emdiemeric](https://community.weweb.io/u/emdiemeric)\
**Post date:** [November 28, 2025, 9:44am UTC](https://community.weweb.io/t/uploading-multiple-files-to-supabase/20442/1 "2025-11-28T09:44:51Z")

</div>

### 

Hi all,

I’m using the standard file upload component to allow users to select and load multiple files.

IF the user selects multiple files, the first file loads, but the other files get an error:

name: “Error”

stack: "Error: new row violates row-level security policy at Object.uploadFile

message: “new row violates row-level security policy”

cause

statusCode: “403”

error: “Unauthorized”

message: “new row violates row-level security policy”

Any ideas?

 ![Screenshot 2025-11-28 at 11.43.46](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/3/385c7420927016f18a2ffe3df38ace591a4f886c.png)

---

<div class="post-metadata">

**Author:** ![Agustin\_Carozo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/agustin_carozo/32/13231_2.png) [@Agustin\_Carozo](https://community.weweb.io/u/Agustin_Carozo)\
**Post date:** [November 28, 2025, 12:49pm UTC](https://community.weweb.io/t/uploading-multiple-files-to-supabase/20442/2 "2025-11-28T12:49:42Z")

</div>

Hi Emeric 👋

It looks like this is caused by Supabase’s Row Level Security (RLS) blocking some of the file uploads, so only the first insert passes the policy and the others are rejected as unauthorized.

You should probably review your Supabase RLS policies for the related table/bucket to make sure they allow multiple inserts (one per file) under the same user/context, and that the conditions aren’t too restrictive for the additional files.

Let me know if you manage to figure it out!

---

<div class="post-metadata">

**Author:** ![emdiemeric](https://avatars.discourse-cdn.com/v4/letter/e/e9bcb4/32.png) [@emdiemeric](https://community.weweb.io/u/emdiemeric)\
**Post date:** [November 28, 2025, 3:20pm UTC](https://community.weweb.io/t/uploading-multiple-files-to-supabase/20442/3 "2025-11-28T15:20:56Z")

</div>

Yes, my question was why would the second file would hit that issue? Haven’t sorted it out yet..

---

<div class="post-metadata">

**Author:** ![Agustin\_Carozo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/agustin_carozo/32/13231_2.png) [@Agustin\_Carozo](https://community.weweb.io/u/Agustin_Carozo)\
**Post date:** [November 28, 2025, 7:20pm UTC](https://community.weweb.io/t/uploading-multiple-files-to-supabase/20442/4 "2025-11-28T19:20:43Z")

</div>

Can you share some screenshots from your RLS in supabase?

---

<div class="post-metadata">

**Author:** ![emdiemeric](https://avatars.discourse-cdn.com/v4/letter/e/e9bcb4/32.png) [@emdiemeric](https://community.weweb.io/u/emdiemeric)\
**Post date:** [November 28, 2025, 8:27pm UTC](https://community.weweb.io/t/uploading-multiple-files-to-supabase/20442/5 "2025-11-28T20:27:17Z")

</div>

I tried a few versions. But this is the latest.

 ![Screenshot 2025-11-28 at 22.26.20](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/285fc5e7ef2b5543c27531a6b98a773ac298e1b1.png)
