File Picker
StackOne File Picker SDK Documentation
The StackOne File Picker SDK enables you to integrate file selection from connected accounts into your application.
Below are the installation steps, usage examples, and API details.
Installation
Install the SDK using one of the following package managers:
Connect Session Token
The File Picker requires creating a separate connect session token with the Account ID and Provider Key of a connected account.
Usage
Below you can find the basic usage of the StackOne File Picker SDK using React:
API Reference
FilePicker Class
Constructor: FilePicker(options)
The options object can include the following parameters:
The session token generated on the server side.
The base URL for the StackOne API.
The ID of the container to mount the picker into.
Callback function that is triggered when files are selected. The function will return an array of files with the Unified ID that can be used in the Unified Download Documents API. After receiving the files, the File Picker will close automatically.
Callback function that is triggered when the picker opens.
Callback function that is triggered when the picker closes.
Callback function that is triggered when the picker is closed without file selection.
Methods
Opens the file picker interface.
Closes the file picker interface.
Was this page helpful?