Interface PickerInstance

Hierarchy

  • PickerInstance

Properties

Properties

cancel: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Cancel picker uploads. This operation is idempotent.

      Returns Promise<void>

close: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Close picker. This operation is idempotent.

      Returns Promise<void>

crop: ((files: any[]) => Promise<void>)

Type declaration

    • (files: any[]): Promise<void>
    • 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);

      Parameters

      • files: any[]

      Returns Promise<void>

open: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Open picker. This operation is idempotent.

      Returns Promise<void>