Hi all,
Hopefully someone is using the supabase plugin and the uploader who can help me.
My scenario is as follows.
I have a use case where a user creates a record in our supabase table and at the same time creates a file in the storage in a folder that is the unique id. I have a process where I generate a random code for all the uploads and store the uploaded filename in the relevent users table.
my issue is that when a user wants to add an item, our process generates the random code and passes it into the plugin for it to create the file on the storage - this works. however when they want to upload another file for another record (only one file per record) in the same folder. our process regenerates a new random code, however the plugin has not recognised that the code has changed and tries to create the file in the storage with the previous name. I’ve tried to ‘reset’ the element, but I can’t seem to find a way to force it to forget the old code and replace with the new one.
hopefully you can see it in my screen shots. the code is in the bottom centre for the new entry (bpj….) and you can see on the diagnostic that the old file (EJq….) was processed and then attempted again.
my workflow has the reset element within it, as does the clearing of the code and resetting of a new code.
if anyone has seen something like this or can offer suggestions for a solution I’d be very grateful.
thanks
I have since found a workaround for this problem after many hours thinking about it…
I have a workflow that is triggered when a file is uploaded…
this renames the file to the unique reference I’ve pre generated and allows the file to be saved.
1 Like
tagging @ZeroqodeSupport so they can find your question 
2 Likes
Hello!
@fede.bubble thank you for tagging us!
@robbie.macintosh1 ,
Thanks for the details—let’s run a focused debug pass so we can pinpoint why the uploader keeps the old code. Could you reproduce the issue and record a Loom while following this checklist?
Prep
- Hard-reload the page and open it with
?debug_mode=true.
- Clear the uploader, then start from a clean state.
Step-by-step (record all of this)
- In Bubble’s step-by-step debugger, add breakpoints on:
- Set state (your
random_code)
- Reset SupabaseUploader (set Revert files? = yes and Remove files? = yes)
- The Upload action / event you use
- Any steps with Only when conditionals
- For Upload #1 (code A):
- Before choosing the file, open the element inspector for the uploader and show exposed states (e.g., selected file name, folder/path, any “file key/target name” state, is_uploading).
- After each step, click “Result of step …” in the debugger and check the values used.
- Trigger your Reset action. Confirm in the inspector that the prior file/keys are cleared.
- Generate code B (new random code). Show the state value in the inspector (parent group/custom state + any state the uploader reads).
- For Upload #2:
- Again, before choosing the file, show the uploader’s exposed states.
- Start the upload and keep the debugger open; click each step to verify the value passed as the target file name/path.
Please share
- Loom link (screen + mic) showing the whole run.
- The page URL (test version) and exact plugin versions.
Once we review the recording and values, we’ll know how to assist you further.
Best regards,
Support Team
Browse all Zeroqode Plugins for Bubble
