Create a policy that allows authenticated users to write to the avatars
bucket.
sql
CREATE POLICY "AllowAuthenticatedWritesToAvatars"
ON storage.objects FOR INSERT
WITH CHECK (auth.uid() IS NOT NULL AND bucket_id = 'avatars'::text);
Create a policy that allows authenticated users to write to the avatars
bucket.
CREATE POLICY "AllowAuthenticatedWritesToAvatars"
ON storage.objects FOR INSERT
WITH CHECK (auth.uid() IS NOT NULL AND bucket_id = 'avatars'::text);