uploadcaredocs

Install File Uploader

  • This documentation is for the version 3.6.1 of the widget. If you’re looking for the widget v2 docs, check here.

If you’re up to manually installing Uploadcare Widget, you’re free to choose one from the install methods listed below,

Please refer to our libraries and integrations for some ready-made solutions.

Before proceeding with your install, check out the requirements and existing types of widget bundles.

Requirements

External Dependencies and jQuery

Uploadcare Widget does not have any external dependencies except for jQuery. We provide two different versions of our widget: with built-in jQuery and without it. See the types of existing widget bundles for more info.

For instance, with the jQuery-enabled widget version you could go like,

var $ = uploadcare.jQuery;
$('body').append('It works!');

Types of Bundles

There are a few types of js bundles:

  • uploadcare.full.js — a full bundle with built-in jQuery,
  • uploadcare.js — a bundle without built-in jQuery,
  • uploadcare.api.js — a bundle without UI of the widget and built-in jQuery, JavaScript API only,
  • uploadcare.ie8.js — a full bundle with built-in jQuery 1.x for IE 8 support (widget v. 2.x and below),
  • uploadcare.lang.en.js — a bundle without built-in jQuery, en locale only.

Each bundle has its minified version. Just add .min before .js, e.g. uploadcare.min.js.

By default, uploadcare.min.js is exported to NPM and other package managers.

Install

CDN

Embed the file uploader client library using the <script> element in the <head> section of each page where you’d like the widget to show up. This CDN link, for instance, embeds the widget version with built-in jQuery,

<script src="https://ucarecdn.com/libs/widget/3.x/uploadcare.full.min.js" charset="utf-8"></script>

You might also happen to already use jQuery on your page. In this case, consider loading the light widget version without built-in jQuery,

<script src="https://code.jquery.com/jquery-3.2.1.min.js" charset="utf-8"></script>
<script src="https://ucarecdn.com/libs/widget/3.x/uploadcare.full.min.js" charset="utf-8"></script>

NPM

npm install uploadcare-widget
import uploadcare from 'uploadcare-widget'

Note, the package will not work in the strict mode.

Bower

bower install uploadcare

We’re always happy to help with code, integration, and other stuff. Search our site for more info or post your question in our Community Area.