@knight Thank you for creating a blog post to explain this. I can't get it to work yet so maybe you have advice for me. This is what I did.
-
In Supabase I created a bucket with no policies and no folders
-
In Retool I created the resource Supabase Upload API
-
I created the resource APIUploadFile with the following:
- Headers: Authorization Bearer [Project API keys > anon]
- Body Form Data file {{ d }}
-
I created a runQuerySingle with this
for (let i = 0 ; i < fileButton1.files.length; i++) {
let x = { data: fileButton1.value[i],...fileButton1.files[i] }
ApiUploadFile.trigger({additionalScope: { i: i, d: x}})
}
}
return go()
- I created a fileButton1 and added the event handler Change runQuerySingle
Now, when I upload and Image I get the error message:
Cannot destructure property 'data' of 'base64Data' as it is null.
Do you have any tips?
Maybe @joeBumbaca ?
Thanks!