This repository contains examples of how to upload images to Cloudinary in a Next.js application. The examples are based on the Cloudinary documentation and the Next.js documentation. The examples are written in TypeScript and it shows how you can upload images to Cloudinary using server actions.
- Next.js
- TypeScript
- Cloudinary
- Tailwind CSS
- Database: PostgreSQL
- Migrations: Ley
- Upload image to Cloudinary using
server action - Return data from the
server actionand access the data in the client - Error handling in the
server actionand displaying the error message in the client - Display the uploaded image in the client
git clone https://github.com/Eprince-hub/cloudinary-image-upload-example.gitcd cloudinary-image-upload-examplepnpm installtouch .envPGHOST=localhost
PGDATABASE=your_database_name
PGUSERNAME=your_database_username
PGPASSWORD=your_database_password
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secretpnpm migrate uppnpm dev
- Cloudinary
- Next.js
- Tailwind CSS
- PostgreSQL
- Cloudinary and Next.js Server action
- TypeScript
- Ley
- Node.js
- React
- Vercel
- pnpm
This project is open source and available under the MIT License.