Skip to content

cloudinary-training/cld-upload-presets

Repository files navigation

Upload Presets Demo Repo for Training/Tutorial

In this module we walk through how to programmatically create two different upload presets and then use those presets to upload assets to Cloudinary. We also take a peek at a more complex preset that you could use to process short form video.

Environment Setup

Install Node.js and NPM

You will need to install Node.js on your machine, version 10 or higher. Installing Node.js will also install npm, the package manager for Node.js.

Mac Users

Using Homebrew:

brew install node

Windows

Download for windows

Verify Node/NPM install

$ node --version
v16.13.0

$ npm --version
8.1.0

Choose an IDE or Use Text Editor

Visual Studio Code WebStorm Sublime Atom iTerm

Download Repository

cust-training-2022 GitHub Repository

  • Assets are located in /assets directory
  • Run code from root directory

Credentials

  1. Create a free account on Cloudinary at [https://www.cloudinary.com/signup]

  2. Navigate to the Dashboard. Copy the CLOUDINARY_URL into your clipboard.

Dashboard

  • Key: CLOUDINARY_URL
  • Value: cloudinary://API_KEY:API_SECRET@CLOUD_NAME
  1. Create a .env file in the root of the project. Paste the CLOUDINARY_URL environment variable into your .env file.

Run Code: Test Credentials

Npm install Node.js libraries. You will be using the cloudinary and the dotenv libraries.

npm i

Run Code: Run code in optimization directory

Example: run image upload script

node optimization/images/upload.js

Video Tutorial

You can find a video tutorial: in Cloudinary Documentation that covers Node.js setup and upload to your Cloudinary cloud.

Upload Presets Docs

Additional information about upload presets from the docs upload presets docs:

Asset Credits

Photo by Andrea Piacquadio from Pexels: https://www.pexels.com/photo/woman-in-collared-shirt-774909/

Photo by Ganimat Pashazade from Pexels: https://www.pexels.com/photo/baby-in-white-and-blue-jacket-lying-on-snow-covered-ground-8882288/

Über uns

Upload Presets Demo Repo for Training and Tutorial Video

Ressourcen

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published