Saving bytea field from supabase-js

What is the correct way of saving a JavaScript Uint8Array to a Postgres bytea column using supabase-js?
If I pass a raw JavaScript Uint8Array to upsert() https://supabase.com/docs/reference/javascript/upsert it seems the byte array values get mangled when saved in Postgres
Screenshot_2024-01-04_at_4.02.09_PM.png
Was this page helpful?