How the Filestack Picker works
masterThe Filestack Picker is an upload widget that can be initialized from a Filestack client instance using client.picker(options).
Once initialized, the returned picker instance provides the following control methods:
open(): Creates the application and mounts it into the DOM based on thedisplayModeprovided in options.close(): Closes the application and removes its resources from the DOM.crop(files): Creates the application, mounts it, and pre-selects the specified files for cropping.cancel(): Cancels all uploads currently controlled by this picker instance.
// Example initialization
const picker = client.picker({
// options from https://filestack.github.io/filestack-js/interfaces/pickeroptions.html
});
// Controlling the picker
picker.open();