Join Discord
Powered by
can I use this server side? https://supabase.com/d...
# javascript
j
Jaeden
03/02/2022, 3:25 PM
can I use this server side?
https://supabase.com/docs/reference/javascript/storage-from-upload#upload-file
I'm getting a constraint error in the
owner
column.
g
garyaustin
03/02/2022, 4:12 PM
I don't know the current best way to do it from the server, but the .upload method expects a jwt in the bearer header with the user uuid in it. It uses that to set the owner column which is a foreign key link to the auth.users table (I believe). This is likely the cause of your error. Here are some threads I found, sorry I did not find a clear answer, but it may be out there:
https://github.com/supabase/supabase/discussions/1002
https://github.com/supabase/storage-api/pull/29
https://github.com/supabase/storage-js/issues/5
j
Jaeden
03/03/2022, 12:29 PM
Ah, thank you! That's very helpful
Jaeden
03/03/2022, 12:29 PM
Appreciate it
@User
< 3
Previous
Next