Best way to store a image in storage with additional data

How could I relate information such as a caption, team_id (uuid of the team that the image belongs to), location, and other stuff to the image in storage. I am looking for a way that won't leave a image with no data or data with no image. (AKA I don't want to upload the image, get the id from the image, then create the record all client side. Is there a way to do this with RPC or a edge function? (One invoke/call from browser to create record and upload image?)
Was this page helpful?