# Upload Multiple Files in Supabase Bucket

**URL:** <https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778>\
**Category:** Wized\
**Created:** [January 24, 2026, 4:30am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778 "2026-01-24T04:30:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mona.lgtpl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/mona.lgtpl/32/3844_2.png) [@mona.lgtpl](https://forum.finsweet.com/u/mona.lgtpl)\
**Post date:** [January 24, 2026, 4:30am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778/1 "2026-01-24T04:30:27Z")

</div>

![image](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/5/5d7f4178977c1077bbd663e66682e9e16b5e166b.png)

Can anybody help me how to upload multiple image files like in loop to a supabase storage bucket. Thank you.

---

<div class="post-metadata">

**Author:** ![elvisben](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/elvisben/32/3990_2.png) [@elvisben](https://forum.finsweet.com/u/elvisben)\
**Post date:** [January 26, 2026, 9:50am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778/2 "2026-01-26T09:50:05Z")

</div>

Hello,

Unfortunately the multiple file upload to supabase in Wized isn’t natively supported yet. However you can use a combination of the supabase client from wized to upload multiple files.

First you need to get the client from Wized, this is possible through the `Wized.requests.getClient()` method. Here is its documentation: [https://docs.wized.com/javascript-api/#wized-requests-getclient](https://docs.wized.com/javascript-api/#wized-requests-getclient)   
It might look something like below:

`const supabase = await Wized.requests.getClient('Supabase App');`

After this, you can then use the supabase docs to upload your files. The relevant documentation is here: [https://supabase.com/docs/reference/javascript/storage-from-upload](https://supabase.com/docs/reference/javascript/storage-from-upload)

While using it - you’ll need to fetch the input first and then loop it through. It might look something like:  
`const myFilesInput = document.querySelector('.my-file-input');`  
`for (file of myFIlesInputs.files){ const {data, error} = await supabase.client.storage.from('mybucketname').upload('myfilename.png', file`

`}``

---

<div class="post-metadata">

**Author:** ![mona.lgtpl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/mona.lgtpl/32/3844_2.png) [@mona.lgtpl](https://forum.finsweet.com/u/mona.lgtpl)\
**Post date:** [January 27, 2026, 7:14am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778/3 "2026-01-27T07:14:02Z")

</div>

![image](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/0/082fe87ef1d7f8335f85a693b899debed1926817.png)

Hey, I tried doing with “Run Function” , but seems like Its not working. Am I doing it right?  
**Wized read-only link** : [Wized](https://app.wized.com/preview/4Fr6yi7C9KS4IvTqCWEd)  
**Path** : /article

---

<div class="post-metadata">

**Author:** ![elvisben](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/elvisben/32/3990_2.png) [@elvisben](https://forum.finsweet.com/u/elvisben)\
**Post date:** [January 27, 2026, 9:22am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778/4 "2026-01-27T09:22:48Z")

</div>

I think it’s because the attribute isn’t a form and you want to run the logic on submit

 ![Screenshot from 2026-01-27 12-21-57](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/3/3aff08dc83ee7328c22746fb43202df8dc0e53f9.png)  
Could you change it to be on the form and retry

---

<div class="post-metadata">

**Author:** ![mona.lgtpl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/mona.lgtpl/32/3844_2.png) [@mona.lgtpl](https://forum.finsweet.com/u/mona.lgtpl)\
**Post date:** [January 27, 2026, 10:55am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778/5 "2026-01-27T10:55:24Z")

</div>

![image](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/1/16c662498a87968ca7d033ab752dd3cf5833260a.png)

But, I added the wized attribute in the form

---

<div class="post-metadata">

**Author:** ![elvisben](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/elvisben/32/3990_2.png) [@elvisben](https://forum.finsweet.com/u/elvisben)\
**Post date:** [January 27, 2026, 11:00am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778/6 "2026-01-27T11:00:14Z")

</div>

Yes, that is what I was sharing - on the preview link I checked, the submit element event is tied to an attribute named: `gallery_images_test` and not `test_images_upload` so the function is not tied to the correct element.

---

<div class="post-metadata">

**Author:** ![mona.lgtpl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/mona.lgtpl/32/3844_2.png) [@mona.lgtpl](https://forum.finsweet.com/u/mona.lgtpl)\
**Post date:** [January 27, 2026, 11:38am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778/7 "2026-01-27T11:38:05Z")

</div>

![image](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/d/dbca23b90f545b7355da38a815d55b860a9ea511.png)

Sorry, I didn’t get this, but you can see this is still not working

---

<div class="post-metadata">

**Author:** ![elvisben](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/elvisben/32/3990_2.png) [@elvisben](https://forum.finsweet.com/u/elvisben)\
**Post date:** [January 27, 2026, 11:47am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778/8 "2026-01-27T11:47:51Z")

</div>

I see it is fixed now and does run on submit one more error I’ve seen on the snippet is that you are accessing the `.files` attribute like so:  
`... const files = i.gallery_images_test.files || []; `

Wized already handles that under the hood, so you only need to access it like this:  
`... const files = i.gallery_images_test || []; `

---

<div class="post-metadata">

**Author:** ![mona.lgtpl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/mona.lgtpl/32/3844_2.png) [@mona.lgtpl](https://forum.finsweet.com/u/mona.lgtpl)\
**Post date:** [January 27, 2026, 11:50am UTC](https://forum.finsweet.com/t/upload-multiple-files-in-supabase-bucket/6778/9 "2026-01-27T11:50:54Z")

</div>

ahhh!, got it now, yes its working now, thank you thank you.😊
