🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more →
Socket
Book a DemoInstallSign in
Socket

uploadcare-netlifycms

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uploadcare-netlifycms

File Uploader by Uploadcare. The plugin for NetlifyCMS to work with Uploadcare Widget.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

File Uploader by Uploadcare

This plugin powers your NetlifyCMS with Uploadcare. You will be able to:

  • Upload any media via Uploadcare Widget.
  • Edit images in any browser via Effects Tab.
  • Deliver your media to 220k servers across 130+ countries via our smart CDN.
  • Adjust your image content delivery via Image Processing.

NPM version GitHub release  Uploadcare stack on StackShare

Demo

Check out how it works via the demo based on netlify-templates/one-click-hugo-cms.

You are free to register, but since Git Gateway is disabled, you won’t be able to publish your changes.

The source code of our demo can be found here.

Install

This plugin can be installed via NPM:

npm install uploadcare-netlifycms --save

Usage

Just import and initialize uploadcare-netlifycms:

import CMS from "netlify-cms";
import uploadcare from "uploadcare-netlifycms";

uploadcare();

Note, uploadcare-netlifycms should be initialized after importing netlify-cms.

Configuration

There is only one required option, your public API key. You can get one by signing up for Uploadcare. Another option is using demopublickey for testing purposes. But note, we are wiping out all files on our demo account every few hours.

uploadcare({
  effectsTab: true,
  widgetOptions: {
    publickey: "yourpublickey"
  }
});

The effectsTab property specifies whether in-browser image editing should be enabled. widgetOptions get passed to the widget. Check out our widget docs to learn more about its options.

Usage with your editor component

You can implement our widget in your Editor Component as a field:

{
  fields: [
    {
      name: "fileInfo",
      options: {
        multiple: true
      },
      label: "Uploadcare",
      widget: "uploadcare"
    }
  ];
}

uploadcare stands for the widget type, it’s a constant.

options are passed to the widget. Learn more about options in the widget docs.

fileInfo stands for the widget value name. It follows the widget’s fileInfo structure. When restored from a markdown block, it will at least contain the cdnUrl and name properties: they are used for a preview.

Security issues

If you think you ran into something in Uploadcare libraries which might have security implications, please hit us up at bugbounty@uploadcare.com or Hackerone.

We'll contact you personally in a short time to fix an issue through co-op and prior to any public disclosure.

Feedback

Issues and PRs are welcome. You can provide your feedback or drop us a support request at hello@uploadcare.com.

FAQs

Package last updated on 07 Jun 2018

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