© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
7 replies
wieli

How to access a file from table with js API

Hi, I have a table called
Recipes
Recipes
in which I created a column
image_id
image_id
which is a foreign key to an image id in my public bucket
recipe_images
recipe_images
.

I would think that with the js API I could get the image with
const { data, error } = await supabase.from("Recipes").select("recipe_images(*)")
const { data, error } = await supabase.from("Recipes").select("recipe_images(*)")
.

However this results in
Could not find a relationship between 'Recipes' and 'recipe_images' in the schema cache
Could not find a relationship between 'Recipes' and 'recipe_images' in the schema cache


I can't find the correct way in the docs, does someone know how to do this?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to upload a file to storage with the API?
SupabaseSSupabase / help-and-questions
3y ago
Using a view within a js API query to a table.
SupabaseSSupabase / help-and-questions
3y ago
How can I export data from a table to a .csv file?
SupabaseSSupabase / help-and-questions
3y ago
Update a supabase table row from next.js
SupabaseSSupabase / help-and-questions
4y ago