# Bug? cant add a file to multi file upload as it deletes all previous files

**URL:** <https://community.weweb.io/t/bug-cant-add-a-file-to-multi-file-upload-as-it-deletes-all-previous-files/14058>\
**Category:** How do I?\
**Created:** [October 22, 2024, 1:15am UTC](https://community.weweb.io/t/bug-cant-add-a-file-to-multi-file-upload-as-it-deletes-all-previous-files/14058 "2024-10-22T01:15:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [October 22, 2024, 1:15am UTC](https://community.weweb.io/t/bug-cant-add-a-file-to-multi-file-upload-as-it-deletes-all-previous-files/14058/1 "2024-10-22T01:15:23Z")

</div>

I want the user to be able to upload multiple files but also add to those files without it deleting the ones they already uploaded.  
How do I do that?

 ![fileupload2](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/d25e123365a87afad3018314edd08fb8a5e0f291.png)  
 ![fileupload1](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/2e7572d35f960a1c557953e9258d9208fae2913b.png)

Also just noticed that if I upload 1 at a time, even though the array displays everything in the data tree it doesnt actually show anything but the first item in the array. So when uploading it will only upload the first item and not the others.  
so you HAVE to add all images at the same time. this doesnt seem right, is this a bug?

---

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [October 23, 2024, 1:40am UTC](https://community.weweb.io/t/bug-cant-add-a-file-to-multi-file-upload-as-it-deletes-all-previous-files/14058/2 "2024-10-23T01:40:33Z")

</div>

I asked in the supabase discord and they said my RLS policy looks correct.  
so now I am more stumuped, im not sure what else to look into

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [October 23, 2024, 9:30am UTC](https://community.weweb.io/t/bug-cant-add-a-file-to-multi-file-upload-as-it-deletes-all-previous-files/14058/3 "2024-10-23T09:30:09Z")

</div>

You need to use the merge formula to merge the arrays while using a multiupload

---

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [October 24, 2024, 2:05am UTC](https://community.weweb.io/t/bug-cant-add-a-file-to-multi-file-upload-as-it-deletes-all-previous-files/14058/4 "2024-10-24T02:05:46Z")

</div>

Im doing it differently at the moment and just using the supabase upload on the actual upload element. I was using it on the form before but to debug i made it more simple and i am still struggling.

theres a whole lot of parts I am still trying to work out but I made a post asking for help on that issue

[https://community.weweb.io/t/how-do-i-list-and-delete-files-from-supabase-storage-bucket-nothing-shows-up/14118](https://community.weweb.io/t/how-do-i-list-and-delete-files-from-supabase-storage-bucket-nothing-shows-up/14118)
