JavaScript File Uploader

Use this integration when you want to work directly with Web Components in a plain JavaScript or vanilla HTML app.

Minimal setup

  1. Install the package:
$npm install @uploadcare/file-uploader
  1. Register components and include styles in your entry file.

  2. Add uc-config, an uploader component, and uc-upload-ctx-provider to your page.

Read setup details in:

Examples

Play with CodeSandbox   Open in StackBlitz

This example includes:

  • minimal uploader
  • regular uploader
  • headless regular uploader with custom trigger
  • custom Unsplash source plugin usage

Notes and pitfalls

  • Make sure UC.defineComponents(UC) runs before custom elements are used.
  • If you integrate custom source plugins, use the Plugin API example as a reference.
  • For secure upload flows, review Security settings.