File Picker
StackOne File Picker
The StackOne File Picker provides a unified interface for browsing and selecting documents from third-party platforms. It abstracts provider-specific differences behind a consistent user experience and developer interface, whether the source is a file storage system (like SharePoint, OneDrive, Google Drive) or a knowledge base (like Confluence or Notion).
How It Works
The File Picker allows users to:
- Navigate a hierarchical file tree (folders, pages, blocks)
- Select one or more files or documents
- Return a list of StackOne file objects, which can be used with unified operations such as
GET /files/{id}
orPOST /files/download
Picker Types
Provider | Picker Type | Navigation Model | Notes |
---|---|---|---|
SharePoint | Native | Site → Drive → Folder → File | Microsoft-native picker with StackOne-built site selection UI |
OneDrive | Native | Drive → Folder → File | Standard OneDrive picker scoped to user’s personal/business drive |
Google Drive | Native | Drive → Folder → File | Uses Google Picker SDK |
Confluence | Custom | Space → Page | Pages act as both folders and files based on content/children |
Notion (Coming Soon) | Custom | Workspace → Page | Pages/blocks behave similarly to Confluence in dual file/folder roles |
Output Format
When a user completes selection, the picker returns:
Each fileId
corresponds to a StackOne-normalized file object that can be accessed via API:
GET /files/{id}
– fetch file metadataPOST /files/{id}/download
– retrieve file contents (if supported)
File Object Structure (for Fetch)
When queried individually, a file returns the following structure:
-
For knowledge bases like Confluence and Notion:
- Files may represent pages or blocks
- Additional metadata like
hasContent
,hasChildren
is provided
Provider Feature Table
Feature / Capability | SharePoint | OneDrive | Google Drive | Confluence | Notion (coming) |
---|---|---|---|---|---|
Picker Type | Native | Native | Native | Custom | Custom |
Tree Navigation | ✅ | ✅ | ✅ | ✅ | ✅ |
Multi-file Selection | ✅ | ✅ | ✅ | ✅ | ✅ |
Selectable File Types | Any document | Any document | Any document | Pages | Pages |
Folder Navigation | ✅ | ✅ | ✅ | ✅ | ✅ |
Dual-role Items | N/A | N/A | N/A | ✅ (pages) | ✅ (pages/blocks) |
Output (on select) | List of File objects | List of File objects | List of File objects | List of File objects | List of File objects |
Unified Fetch / Download | ✅ | ✅ | ✅ | ✅ | ✅ |
Developer Integration
-
Trigger the Picker Use the StackOne SDK, embed directly via the UI component or trigger via the StackOne Dashboard.
-
Receive Selection The picker will return:
-
Perform Unified Actions
- Fetch metadata:
GET /files/{id}
- Download file:
POST /files/{id}/download
- Fetch metadata:
Auth & Permissions
-
Each provider uses OAuth2 authentication via StackOne’s integration flow
-
File access scopes are handled per provider during auth
- SharePoint:
Files.Read.All
,Sites.Read.All
- Google:
https://www.googleapis.com/auth/drive.readonly
- Confluence/Notion: Read access to spaces/pages/blocks
- SharePoint:
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.
Coming Soon: Notion Support
StackOne will soon launch a custom picker for Notion, modeled similarly to Confluence:
- Block/page navigation
- Unified selection of document-style pages
- Multi-select and metadata retrieval