You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

payload-cloudinary-plugin

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

payload-cloudinary-plugin

Extends `payloadcms` with Cloudinary integration

0.1.14
latest
Source
npmnpm
Version published
Weekly downloads
18
5.88%
Maintainers
0
Weekly downloads
 
Created
Source

payload-cloudinary-plugin

Extends payloadcms with Cloudinary integration

Current status

codeql

test

publish

GitHub Super-Linter

Codacy Badge

Install

yarn add payload-cloudinary-plugin

Get Started

server.ts

import { mediaManagement } from "payload-cloudinary-plugin";

app.use(mediaManagement());

payload.config.ts

import cloudinaryPlugin from "payload-cloudinary-plugin/dist/plugins";

export default buildConfig({
    ....
    plugins: [cloudinaryPlugin()]
    ....
})

mediaManagement function

function mediaManagement(
  config?: ConfigOptions,
  uploadApiOptions?: UploadApiOptions,
  uploadResourceTypeHandler?: Function
)

The function may receive a ConfigOptions and a UploadApiOptions from cloudinary package. Additionally, you can specify a uploadResourceTypeHandler to manage which resource_type parameter must be passed to cloudinary.upload (see here: https://cloudinary.com/documentation/image_upload_api_reference#upload_optional_parameters for additional information).

If the uploadResourceTypeHandler is NOT specified, resource_type: auto will be passed to upload method.

FAQs

Package last updated on 02 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts