Manuel Coffin
03/22/2022, 12:39 PMerror: "Key is not present in table \"users\"."
message: "insert or update on table \"objects\" violates foreign key constraint \"objects_owner_fkey\""
statusCode: "23503"
I'm not sure of what it means 🤷♂️
Maybe my policies are not properly set?
Or could it be that the roles=authenticated
property of the request is not understood by supabase?
Any advice about this?Needle
03/22/2022, 12:39 PM/title
command!
We have solved your problem?
Click the button below to archive it.garyaustin
03/22/2022, 1:50 PMNeedle
03/22/2022, 1:50 PMManuel Coffin
03/22/2022, 2:16 PMjs
const fileExt = values.avatar[0].path.split(".").pop()
const fileName = `teacher_${profile.id}.${fileExt}`
let { error: uploadError } = await supabase.storage
.from("public")
.upload(`${"avatar"}/${fileName}`, values.avatar[0])
Where values.avatar[0]
is of type File
Olyno
03/22/2022, 2:18 PMManuel Coffin
03/22/2022, 2:18 PMgaryaustin
03/22/2022, 2:19 PMManuel Coffin
03/22/2022, 2:20 PMManuel Coffin
03/22/2022, 2:20 PMOlyno
03/22/2022, 2:21 PMManuel Coffin
03/22/2022, 2:21 PMgaryaustin
03/22/2022, 2:23 PMOlyno
03/22/2022, 2:27 PMOlyno
03/22/2022, 2:28 PMManuel Coffin
03/22/2022, 2:31 PMOlyno
03/22/2022, 2:32 PMOlyno
03/22/2022, 2:32 PMgaryaustin
03/22/2022, 2:32 PMManuel Coffin
03/22/2022, 2:35 PMOlyno
03/22/2022, 2:37 PMManuel Coffin
03/22/2022, 2:38 PMerror: "Key is not present in table \"users\"."
Olyno
03/22/2022, 2:38 PMManuel Coffin
03/22/2022, 2:38 PMOlyno
03/22/2022, 2:38 PMOlyno
03/22/2022, 2:38 PMManuel Coffin
03/22/2022, 2:39 PMOlyno
03/22/2022, 2:40 PMManuel Coffin
03/22/2022, 2:40 PMOlyno
03/22/2022, 2:40 PMgaryaustin
03/22/2022, 2:41 PMManuel Coffin
03/22/2022, 2:41 PMOlyno
03/22/2022, 2:44 PMgaryaustin
03/22/2022, 2:53 PMManuel Coffin
03/22/2022, 4:22 PMerror: "invalid signature"
message: "invalid signature"
statusCode: "400"
Since I'm on a BlitJs project, that has a default session management, I wonder if there could be some interference between the supabase session and the blitzJs session.
But I have checked, the authorization token sent in the headers in the same that I get when I call supabase.auth.session()
garyaustin
03/22/2022, 4:23 PMManuel Coffin
03/23/2022, 10:06 AM