You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2025. It is now read-only.
Thorben edited this page Nov 21, 2022
·
1 revision
avatar (Public)
In order to provide and save custom avatars uploaded by the users, create an public bucket called avatars and apply the following policies to storage.objects or directly to the bucket.
Policies
Select
CREATE POLICY "Enable read access for all users"ON"storage"."objects"AS PERMISSIVE FOR SELECT
TO authenticated
USING (true)
Insert
CREATE POLICY "Enable insert for authenticated users only"ON"storage"."objects"AS PERMISSIVE FOR INSERT
TO authenticated
WITH CHECK (true)
Update
CREATE POLICY "Enable update for users based on uid"ON"storage"."objects"AS PERMISSIVE FOR UPDATE
TO authenticated
USING (auth.uid() = owner)
WITH CHECK (auth.uid() = owner)
Delete
CREATE POLICY "Enable delete for users based on user_id"ON"storage"."objects"AS PERMISSIVE FOR DELETE
TO authenticated
USING (auth.uid() = owner)