jQuery uploading widget v3 API reference

Uploading Widget API is an extensive set of tools that allows you adjust File Uploader behavior and implement various uploading worfkflows. For example, upload files from URL, moderate uploaded content, adjust Uploading Widget appearance to match your website or app.

As stated in the Uploading Widget configuration section, Uploading Widget options can be set in three ways.

  • Globally, on page load.
  • Locally, when a new Uploading Widget object is created.
  • By passing the settings object.

JavaScript global variables will go in your <script> tag:

<script>
  UPLOADCARE_PUBLIC_KEY = 'YOUR_PUBLIC_KEY';
  UPLOADCARE_LOCALE = 'ru';
</script>

Replace YOUR_PUBLIC_KEY with your public API key.

Local options can be set in the <input> element as data attributes:

<input type="hidden" role="uploadcare-uploader"
  data-public-key="YOUR_PUBLIC_KEY"
  data-images-only
/>

You can also pass most of the Uploading Widget options as an argument holding the settings object to the methods listed in this JavaScript API reference. For instance:

uploadcare.openDialog(null, {
  publicKey: 'YOUR_PUBLIC_KEY',
  imagesOnly: true,
  crop: '300x200'
});