- Go to your Supabase Dashboard: https://app.supabase.com
- Select your project:
gwflrcmaxivxphsdkyyy - Click on "Storage" in the left sidebar
- Click "New bucket"
- Enter the following details:
- Name:
issues - Public bucket: ✅ Check this (we need public URLs for images)
- Click "Create bucket"
- Name:
Go to SQL Editor and run this:
-- Allow public read access to issues bucket
DROP POLICY IF EXISTS "Public Access" ON storage.objects;
CREATE POLICY "Public Access"
ON storage.objects FOR SELECT
USING (bucket_id = 'issues');
-- Allow authenticated users to upload
DROP POLICY IF EXISTS "Authenticated users can upload" ON storage.objects;
CREATE POLICY "Authenticated users can upload"
ON storage.objects FOR INSERT
WITH CHECK (bucket_id = 'issues' AND auth.role() = 'authenticated');
-- Allow users to update their own uploads
DROP POLICY IF EXISTS "Users can update own uploads" ON storage.objects;
CREATE POLICY "Users can update own uploads"
ON storage.objects FOR UPDATE
USING (bucket_id = 'issues' AND auth.uid()::text = owner);
-- Allow users to delete their own uploads
DROP POLICY IF EXISTS "Users can delete own uploads" ON storage.objects;
CREATE POLICY "Users can delete own uploads"
ON storage.objects FOR DELETE
USING (bucket_id = 'issues' AND auth.uid()::text = owner);In your Supabase Storage settings, add these CORS origins:
http://localhost:3001(Admin Panel)http://localhost:19000(Expo Dev Server)- Your production domain when deploying
Test that the storage is working by running this in your browser console (on admin panel):
const { data, error } = await supabase.storage
.from('issues')
.upload('test.txt', new Blob(['Hello World'], { type: 'text/plain' }))
console.log('Upload result:', data, error)The bucket will organize images like this:
issues/
└── issue-images/
├── 1234567890_abc123.jpg
├── 1234567891_def456.png
└── ...
- Free tier: 1 GB storage
- File size limit: 50 MB per file
- Consider upgrading if you expect many high-res images
If uploads fail:
- Check bucket name is exactly
issues - Verify bucket is set to public
- Ensure RLS policies are created
- Check Supabase anon key is correct in .env files