How to use the uploadcare-widget.fileFrom function in uploadcare-widget

To help you get started, we’ve selected a few uploadcare-widget 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-media-library-uploadcare / src / index.js View on Github external
function getFile(url) {
  const groupPattern = /~\d+\/nth\/\d+\//;
  const uploaded = url.startsWith(CDN_BASE_URL) && !groupPattern.test(url);
  return uploadcare.fileFrom(uploaded ? 'uploaded' : 'url', url);
}

uploadcare-widget

Uploadcare Widget: file uploader.

BSD-2-Clause
Latest version published 2 months ago

Package Health Score

87 / 100
Full package analysis