feat: setup Supabase Storage bucket for restaurant assets and add mobile upload helper

This commit is contained in:
AyrisAI
2026-08-20 17:30:22 +03:00
parent 5122ec24fc
commit 5cbd80326f
3 changed files with 75 additions and 0 deletions
@@ -0,0 +1,27 @@
-- Supabase Storage Bucket Setup for Restaurant Assets (Logos, Cover Banners, Menu Items)
insert into storage.buckets (id, name, public)
values ('restaurant-assets', 'restaurant-assets', true)
on conflict (id) do update set public = true;
-- Enable Public Read Access Policy for restaurant-assets bucket
create policy "Public Access for Restaurant Assets"
on storage.objects for select
using ( bucket_id = 'restaurant-assets' );
-- Enable Authenticated User Upload Policy for restaurant-assets bucket
create policy "Authenticated User Upload for Restaurant Assets"
on storage.objects for insert
to authenticated
with check ( bucket_id = 'restaurant-assets' );
-- Enable Authenticated User Update Policy for restaurant-assets bucket
create policy "Authenticated User Update for Restaurant Assets"
on storage.objects for update
to authenticated
using ( bucket_id = 'restaurant-assets' );
-- Enable Authenticated User Delete Policy for restaurant-assets bucket
create policy "Authenticated User Delete for Restaurant Assets"
on storage.objects for delete
to authenticated
using ( bucket_id = 'restaurant-assets' );