# docsPicker(Object object)

Opens Docs selection list

## Support

App capability | Android | iOS | PC | Harmony | Preview
---|---|---|---|---|---
Gadget | V3.12.0+ | V3.12.0+ | V3.13.0+ | V7.49.0+ | Preview
Web app | V3.44.0+ | V3.44.0+ | V3.47.0+ | V7.49.0+ | Preview

## Input

Inherits [standard object input](https://open.feishu.cn/document/uYjL24iN/ukzNy4SO3IjL5cjM), and has the following extension properties:

Name | Data type | Required | Default value | Description
---|---|---|---|---
pickerTitle | string | No | Select Docs | Custom component title
pickerConfirm | string | No | Select | Custom select button text

## Output

Extension property of the object returned in `success`:

Name | Data type | Description
---|---|---
fileList | object[] | File list
&emsp;<br>∟<br>&nbsp;<br>filePath | string | Docs file URL
&emsp;<br>∟<br>&nbsp;<br>fileName | string | Docs file name

##  Sample code

```js
tt.docsPicker({
  pickerTitle: "Select Docs",
  pickerConfirm: "Select",
  success(res) {
    console.log(JSON.stringify(res));
  },
  fail(res) {
    console.log(`docsPicker fail: ${JSON.stringify(res)}`);
  },
});
```

Sample return object for `success`:

```json
{
  "errMsg": "docsPicker:ok",
  "fileList": [
    {
      "filePath": "https://example.feishu.cn/base/bascn**************",
      "fileName": "Sample File 1"
    },
    {
      "filePath": "https://example.feishu.cn/docx/doxcn**************",
      "fileName": "Sample File 2"
    }
  ]
}
```

