> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# my.chooseFileFromDisk

> Choose a file from device storage.

Open file picker to select a file from device storage.

## Parameters

| Property | Type     | Required | Description                   |
| -------- | -------- | -------- | ----------------------------- |
| success  | Function | No       | Callback with file path       |
| fail     | Function | No       | Callback on failure           |
| complete | Function | No       | Callback that always executes |

## Success Callback

| Property   | Type   | Description                   |
| ---------- | ------ | ----------------------------- |
| apFilePath | String | The temporary local file path |

## Error Codes

| Error Code | Error Message                                      | Remark                                          |
| ---------- | -------------------------------------------------- | ----------------------------------------------- |
| 4          | The JSAPI call is denied                           | The mini program has no right to call the JSAPI |
| 12         | Errors occur when copying the file                 |                                                 |
| 15         | The user cancels the file selection                |                                                 |
| 16         | The user denies the permission to read the storage | Android only                                    |
| 17         | No permission to read the storage                  | Android only                                    |
| 18         | Choosing large file is not supported               |                                                 |

## Code Example

```javascript theme={null}
my.chooseFileFromDisk({
  success: (res) => {
    console.log('Selected:', res.apFilePath);
  }
});
```
