Hey folks. I'm attempting to update an object in s...
# javascript
m
Hey folks. I'm attempting to update an object in storage. The storage service is running through a local docker container.
Copy code
javascript
let { error: uploadUpdateError } = await supabaseClient.storage
        .from("assets")
        .update(filePath, uploadImg, { upsert: true });
But I'm getting this error
Copy code
json
{"level":50,"time":1647962861081,"pid":22,"hostname":"b3718797a4f3","reqId":"req-11","tenantId":"adt","error":{"message":"JSON object requested, multiple (or no) rows returned","details":"Results contain 0 rows, application/vnd.pgrst.object+json requires 1 row"},"msg":"error object"}
which I can only find a reference for when using
single()
instead of
.limit(1)
as part of a
.select()
I know the filePath is correct. Any thoughts on what could be causing this or how to resolve it?
Well that was fun. Because I'm self-hosting I didn't think to check the RLS on the storage table because they don't show up through studio. Setting the UPDATE policy fixed it.