Retool + Supabase, how to post to object storage with API?

@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.

  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()

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!