can I use this server side? https://supabase.com/d...
# javascript
j
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
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
Ah, thank you! That's very helpful
Appreciate it @User < 3