New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@contentchef/contentchef-media

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentchef/contentchef-media

Package for helping managing media with ContentChef

latest
Source
npmnpm
Version
6.0.0
Version published
Maintainers
2
Created
Source

Install

npm install @contentchef/contentchef-media
# or alternatively with yarn
yarn @contentchef/contentchef-media

Usage

This package provides methods to help you manage and interact with ContentChef's media

  • createUrl helps you generate a proper url given a media publicId
  • imageUrl helps you create an url for an image given a media publicId
  • videoUrl helps you create an url for a video given a media publicId
  • rawFileUrl helps you create an url for a raw file (pdf, zip, ecc.) given a media publicId
import { createUrl, imageUrl, videoUrl, rawFileUrl } from '@contentchef/contentchef-node';

const mediaPublicId = 'publicId';

const mediaUrl = createUrl(mediaPublicId);

const image = imageUrl(mediaPublicId);

const video = videoUrl(mediaPublicId);

const rawFile = rawFileUrl(mediaPublicId);

// If you'd like to pass transformations you can do so in the second argument of each method
const transformations = {
  height: 100,
  width: 200
}
const mediaUrl = createUrl(mediaPublicId, transformations);

FAQs

Package last updated on 09 Jan 2023

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