Skip to content

banx9x/upload-to-cloudinary-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upload Image to Cloudinary with Node.js, Express, and Multer

This is an example application that demonstrates how to upload images to Cloudinary using Node.js, Express, and Multer.

Prerequisites

Before running the application, make sure you have the following installed:

Getting Started

  1. Clone the repository:
git clone https://github.com/banx9x/upload-to-cloudinary-example.git
cd upload-to-cloudinary-example
  1. Install the dependencies:
npm install
  1. Set up Cloudinary credentials:

    • Create a .env file in the root of the project.

    • Add the following lines to the .env file:

      CLOUDINARY_URL=YOUR_CLOUDINARY_URL
      
    • Replace YOUR_CLOUDINARY_URL with your actual Cloudinary credentials. You can find these credentials in your Cloudinary account dashboard.

  2. Start the application:

npm run dev
  1. Open your web browser and navigate to http://localhost:8080.

  2. Use Postman to upload an image file. The uploaded image will be stored in your Cloudinary account.

Additional Information

  • The application uses the Multer middleware for handling file uploads.
  • Uploaded images are stored in memory using Multer's memoryStorage and then uploaded to Cloudinary using the cloudinary package.
  • The uploaded image URL is returned after successful upload.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published