mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 01:40:01 +00:00
183fe0a93c
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
15 lines
641 B
SQL
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'); |