File Uploader by Uploadcare
This plugin powers your NetlifyCMS with Uploadcare.
You will be able to:
Â

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.