Storage

NeoSaaS leverages Supabase Storage to manage media files securely and efficiently

Configuring Storage

1
Go to your Supabase Project

Open the dashboard of your Supabase project.

2
Navigate to Storage → Create a New Bucket

Click New bucket and create one with a descriptive name, for example: public.

3
Make sure to uncheck Private bucket if you want files to be publicly accessible.

You can later add RLS (Row Level Security) or signed URLs for protected access if needed.

4
Add this bucket to the code

Open /app/api/upload/route.ts file and change the bucket name in the following line with your bucket name (public):

route.ts
const { error } = await supabaseAdmin.storage
 .from('neosaas')
 .upload(`public/${fileName}`, buffer, {
   contentType,
   upsert: true,
   cacheControl: '3600',
 })