How to reset upload file actual file

avatar-ezgif.com-video-to-gif-converter

So here i have an upload file that stores and delete from supabase storage and table that stores the path and full url from supabase storage.

The problem is, when i use a file into the file uploader it changes normally, when i delete too, but it stays in the text and when i try to upload the same file in a row it just doesnt work, i just didnt find where i can reset the file uploader files

So basically i cant delete the last file from the file uploader “files”
i’m using the simple file uploader

I couldn’t find any information about this, and right now it’s bugging out — it’s using a cached value instead of the actual file I’m uploading. I’ve tried everything, but nothing seems to work.

How does a simple file upload actually work?
Where are the files stored when I upload them, and how are they retrieved to display in text?

Also, is it possible to preview the image before sending it to storage?

Like, is it possible to upload the file to a temporary state, show a preview of the image, and only send it to the database when I click “Save”?

I tried something like setting the image element’s src to fileUpload.value, but it didn’t work

u can just fileToUrl(input file.value) and if im not wrong it work for a state image only, at least it worked for me, also im now using the advanced file uploader since it can work just like a simple file uploader, since i understand that simple is for one file only and advanced is for 1+ files but has the option to turn off multiple files and it is more clear where my files are being stored to be uploaded