Files
acmcc/supabase/migrations/20260319023645_4b851328-02a4-4223-b4a3-eb4435e1a547.sql
T
2026-06-01 20:19:26 -04:00

12 lines
390 B
SQL

-- The documents feature stores public file URLs for the 'files' bucket,
-- so the bucket itself must be public for downloads/previews to work.
UPDATE storage.buckets
SET public = true
WHERE id = 'files';
DROP POLICY IF EXISTS "Public can read files bucket" ON storage.objects;
CREATE POLICY "Public can read files bucket"
ON storage.objects
FOR SELECT
TO anon
USING (bucket_id = 'files');