Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PickerInstance

Index

Properties

Properties

cancel

cancel: function

Cancel picker uploads. This operation is idempotent.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

close

close: function

Close picker. This operation is idempotent.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

crop

crop: function

Specify a list of files to open in the picker for cropping

Example

// <input id="fileSelect" type="file">

const inputEl = document.getElementById('fileSelect');
const picker = client.picker({
  onUploadDone: res => console.log(res),
});

inputEl.addEventListener('change', (e) => {
  picker.crop(e.target.files);
});

// Or pass an array of URL strings
const urls = [
  'https://d1wtqaffaaj63z.cloudfront.net/images/fox_in_forest1.jpg',
  'https://d1wtqaffaaj63z.cloudfront.net/images/sail.jpg',
];
picker.crop(urls);

Type declaration

    • (files: any[]): Promise<void>
    • Parameters

      • files: any[]

      Returns Promise<void>

open

open: function

Open picker. This operation is idempotent.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>