File Picker
Merge's File Picker is built into our embedded Merge Link component and provides a user-friendly interface for your customers to browse Files, Folders, and/or Drives in their connected File Storage account. File Picker does not impact your File Storage Linked Account syncs unlike Selective Sync.

To set up File Picker, please follow our Embedded Link guide to add our drop-in Merge Link component to your app.
Enabling the File Picker only requires a few additions to step 2.
In addition to following step 2 of our Embedded Link guide, you will need to add a new parameter filePickerConfig.
onSubmit is the only required input to filePickerConfig, and returns an array of selected objects from your user's workspace.
This input is a callback and is left as console.log() in this example for you to decide how to handle Files, Folders, and Drives that your users have selected in the File Picker. If you are testing the File Picker in your dashboard, no callback is provided and the File Picker will automatically close on submit.
In this example, the File Picker configuration allows multi-select of Files and Folders.
See details about each filePickerConfig input below.
| Input | Type | Description |
types | Array | Optional array of object types that determines which types of objects your users can pick. Possible values for object types include: If For example, if |
allowMultiSelect | Boolean | Optional boolean field that allows your users to select multiple objects in one File Picker session. The default value is |
onSubmit | Function | Callback that returns an array of See an example for |
MergeFileStorageData properties should match our File Storage Common Model properties for the given workspace object type.
Select the object type to see its corresponding properties and example response.
File object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists.idUUIDremote_idStringcreated_atDateTime (ISO 8601)modified_atDateTime (ISO 8601)nameStringfile_urlStringfile_thumbnail_urlStringsizeIntegermime_typeStringdescriptionStringfolderUUIDchecksumObjectpermissionsPermission[]idUUIDremote_idStringcreated_atDateTime (ISO 8601)modified_atDateTime (ISO 8601)userUUIDUSER.groupUUIDGROUP.typeEnumUSER, GROUP, COMPANY, ANYONE. In cases where there is no clear mapping, the original value passed through will be returned. To receive all enum values in the original format, use the show_enum_origins query parameter. Learn more.rolesArrayREAD, WRITE, OWNER. In cases where there is no clear mapping, the original value passed through will be returned.driveUUIDremote_created_atDateTime (ISO 8601)remote_updated_atDateTime (ISO 8601)remote_was_deletedBooleanfield_mappingsObjectremote_dataRemoteData[]RemoteData object is used to represent the full data pulled from the third-party API for an object.pathStringdataAny