How to use the netlify-cms-widget-file.withFileControl function in netlify-cms-widget-file

To help you get started, we’ve selected a few netlify-cms-widget-file examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github netlify / netlify-cms / packages / netlify-cms-widget-image / src / index.js View on Github external
import NetlifyCmsWidgetFile from 'netlify-cms-widget-file';
import previewComponent from './ImagePreview';

const controlComponent = NetlifyCmsWidgetFile.withFileControl({ forImage: true });
const Widget = (opts = {}) => ({
  name: 'image',
  controlComponent,
  previewComponent,
  ...opts,
});

export const NetlifyCmsWidgetImage = { Widget, controlComponent, previewComponent };
export default NetlifyCmsWidgetImage;

netlify-cms-widget-file

Widget for uploading files in Netlify CMS.

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis