I'm getting a 403 on my local storage service (Do...
# help
r
I'm getting a 403 on my local storage service (Docker). Request looks like this: http://192.168.1.119:5000/storage/v1/object/avatars/ Headers include authorization, apikey ( both ANON_KEY). I'm a bit clueless on this issue.. Everything looks fine in the config files. The fact that i'm getting a 403 indicates that the storage service is active and reachable. Anyone have any clue where i need to look? 🙈 The database and auth service work just fine.
n
Hello @Rickert! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
So you were able to create a bucket and had set the RLS policies to do that or are you using service key.
I don't use the rest API for storage but after your avatars/ should there not be a pathname?
You also would need to set up RLS policies on the storage.object table to use the bucket for files if not using the service key.
r
I’ll take a look in a minute. Thx for the help 😃
Why not? What do you use?
I’ll check in a minute. AFK right now
g
I use supabase-js, not the rest API directly. Unless you are saying that is your output from supabase-js?
r
I'm using supabase_flutter for a Flutter app. I've looked at several parts as can be seen on the screenshots. I believe i've correctly set up the RLS policies on the storage.object table as can be seen in the first screenshot.
g
just for later your update policy will need to be using and it can also have with check, but that will default to the using policy.
Take a look at your file upload uri in total it is very odd.
Your bucket get is probably failing as you don't have a policy on buckets table
r
How could i do that? I tried the following but no luck "CREATE POLICY "Allow avatar uploads" ON storage.buckets FOR INSERT" Still 403.
It's running really late now 2am in the night here. Time to let it go for today and try again tomorrow. Thanks for trying to help me @garyaustin !
I give up for now. Maybe better luck in the future. I’ll pick another object storage solution. LakeFS looks like a good alternative. Also requires a PostgreSQL database and a docker installation is available: https://docs.lakefs.io/deploy/docker.html let’s see how easy it is to set up LakeFS with Supabase. 😇
2 Views