Skip to main content

Supabase Storage Integration

Supabase storage is the alternative to AWS S3 or Google Cloud Storage. It allows you to store files in the cloud. In SupaLaunch, we use Supabase storage. We show you how to use it in your NextJS app.

Storage acts similarly to the files on you computer. You can create folders and upload files to them. You can also delete files and folders.

In our example, we show how to upload images to the storage and how to display them in your NextJS app.

In order to setup the storage for your SupaLaunch project, please follow the Getting Started guide.

Uploading images to the storage

In SupaLaunch, we use example of how to create a card with an image. Upload images to the storage is located in /src/app/api/cards/route.ts. The process is the following:

  1. Upload the image to the storage.
  2. Save path to the corresponding card in the database.
  3. When we display the card, we get the path to the image from the database and display it.