mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 09:50:01 +00:00
Add ACMCC app source, Supabase backend, and project config
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
-- Make the 'files' bucket public so existing getPublicUrl links resolve.
|
||||
-- The codebase already calls getPublicUrl() on this bucket and stores the URL
|
||||
-- in documents.file_url, so the bucket must be public for those links to load.
|
||||
UPDATE storage.buckets SET public = true WHERE id = 'files';
|
||||
|
||||
-- Ensure a public SELECT policy exists for this bucket.
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1 FROM pg_policies
|
||||
WHERE schemaname = 'storage'
|
||||
AND tablename = 'objects'
|
||||
AND policyname = 'Files bucket public read'
|
||||
) THEN
|
||||
CREATE POLICY "Files bucket public read"
|
||||
ON storage.objects FOR SELECT
|
||||
USING (bucket_id = 'files');
|
||||
END IF;
|
||||
END $$;
|
||||
Reference in New Issue
Block a user