File Uploader API Reference

File Uploader API is an extensive set of tools allowing you to adjust the Uploader behavior and implement advanced worfkflows like uploading files from URL, moderating uploaded content, and playing with the file uploader appearance.

It is important to note that as stated in the file uploader configuration section, file uploader options can be set in three ways.

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

JavaScript global variables are put in your <script> tag,

  UPLOADCARE_PUBLIC_KEY = 'demopublickey';

Local options are set in the <input> element as data attributes,

<input type="hidden" role="uploadcare-uploader"

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

uploadcare.openDialog(null, {
  publicKey: 'demopublickey',
  imagesOnly: true,
  crop: '300x200'