feat: map shapes, image persistence, grab tool, layer rename/delete, i18n, page metadata
This commit is contained in:
28
supabase/migrations/033_files_storage.sql
Normal file
28
supabase/migrations/033_files_storage.sql
Normal file
@@ -0,0 +1,28 @@
|
||||
-- Create storage bucket for uploaded files
|
||||
INSERT INTO storage.buckets (id, name, public, file_size_limit)
|
||||
VALUES ('files', 'files', true, 52428800) -- 50MB max file size
|
||||
ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
-- Allow authenticated users to upload files (organized by org_id/folder)
|
||||
CREATE POLICY "Authenticated users can upload files"
|
||||
ON storage.objects FOR INSERT
|
||||
TO authenticated
|
||||
WITH CHECK (bucket_id = 'files');
|
||||
|
||||
-- Allow authenticated users to update their files
|
||||
CREATE POLICY "Authenticated users can update files"
|
||||
ON storage.objects FOR UPDATE
|
||||
TO authenticated
|
||||
USING (bucket_id = 'files');
|
||||
|
||||
-- Allow public read access to all files
|
||||
CREATE POLICY "Public read access for files"
|
||||
ON storage.objects FOR SELECT
|
||||
TO public
|
||||
USING (bucket_id = 'files');
|
||||
|
||||
-- Allow authenticated users to delete files
|
||||
CREATE POLICY "Authenticated users can delete files"
|
||||
ON storage.objects FOR DELETE
|
||||
TO authenticated
|
||||
USING (bucket_id = 'files');
|
||||
Reference in New Issue
Block a user