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:
- Upload the image to the storage.
- Save path to the corresponding card in the database.
- When we display the card, we get the path to the image from the database and display it.