Files
acmcc/supabase/migrations/20260421015818_b0fd3806-265f-4e3f-ab80-ceb278f80382.sql
2026-06-01 20:19:26 -04:00

15 lines
641 B
SQL

-- Make email-images bucket public so embedded images render in email clients
UPDATE storage.buckets SET public = true WHERE id = 'email-images';
-- Public read policy for email-images
DROP POLICY IF EXISTS "Public can read email images" ON storage.objects;
CREATE POLICY "Public can read email images"
ON storage.objects FOR SELECT
USING (bucket_id = 'email-images');
-- Authenticated users can upload email images
DROP POLICY IF EXISTS "Authenticated can upload email images" ON storage.objects;
CREATE POLICY "Authenticated can upload email images"
ON storage.objects FOR INSERT
TO authenticated
WITH CHECK (bucket_id = 'email-images');