Skip to content

Cloudinary

Using Cloudinary for secure, scalable file uploads and management in NextSaasPilot.

NextSaasPilot Cloudinary Setup

NextSaasPilot uses AWS S3 as the default storage provider. If you prefer to use Cloudinary instead, you'll need to modify the storage configuration in your application. The setup instructions below will guide you through configuring Cloudinary as an alternative storage solution.

Cloudinary Setup

You need a Cloudinary account and API credentials:

  1. Step 1: Create a Cloudinary Account

  2. Step 2: Get Your API Credentials

    • Navigate to your Dashboard (default landing page after login)
    • You'll find your credentials in the "Account Details" section:
      • Cloud Name
      • API Key
      • API Secret
  3. Step 3: Update Your Environment Variables

    Add your Cloudinary credentials to your environment variables file (.env):

    txt
     CLOUDINARY_CLOUD_NAME=""
     CLOUDINARY_API_KEY=""
     CLOUDINARY_API_SECRET=""

Switch from AWS S3 to Cloudinary

To use Cloudinary instead of AWS S3, you only need to update one import statement in your code in src/actions/file-actions.ts

ts
// Change this:
import { removeFromStorage, uploadToStorage } from "@/lib/s3";

// To this:
import { removeFromStorage, uploadToStorage } from "@/lib/cloudinary";

Built with NextSaasPilot