{"id":20969884,"url":"https://github.com/ourcodeworld/capacitor-native-filepicker","last_synced_at":"2025-07-13T20:03:54.829Z","repository":{"id":201968997,"uuid":"389157622","full_name":"ourcodeworld/capacitor-native-filepicker","owner":"ourcodeworld","description":"A native file picker implementation for CapacitorJS projects.","archived":false,"fork":false,"pushed_at":"2021-12-25T23:14:25.000Z","size":111,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T06:51:36.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ourcodeworld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-07-24T17:15:58.000Z","updated_at":"2025-03-01T23:59:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7b7360d-b802-4c31-9149-05225e983890","html_url":"https://github.com/ourcodeworld/capacitor-native-filepicker","commit_stats":null,"previous_names":["ourcodeworld/capacitor-native-filepicker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ourcodeworld/capacitor-native-filepicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ourcodeworld%2Fcapacitor-native-filepicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ourcodeworld%2Fcapacitor-native-filepicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ourcodeworld%2Fcapacitor-native-filepicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ourcodeworld%2Fcapacitor-native-filepicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ourcodeworld","download_url":"https://codeload.github.com/ourcodeworld/capacitor-native-filepicker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ourcodeworld%2Fcapacitor-native-filepicker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265198349,"owners_count":23726447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T03:53:24.800Z","updated_at":"2025-07-13T20:03:54.748Z","avatar_url":"https://github.com/ourcodeworld.png","language":"Java","readme":"# capacitor-native-filepicker\n\nIn most of the cases, you don't need this picker. Implementing your own filepicker with the [File System API](https://capacitorjs.com/docs/apis/filesystem) of CapacitorJS is quite [easy and convenient](https://www.youtube.com/watch?v=WNte407ArQ0) as its design will be totally yours and matches your application UI. I developed this plugin because I wanted to use a more native approach in my application that allows users to pick some files or folders from the storage (as well as learning how to develop CapacitorJS plugins for both platforms). \n\nFor Android it uses under the hood the [AndroidFilePicker library by Rosuh](https://github.com/rosuH/AndroidFilePicker). For iOS, it uses the [UIDocumentPickerViewController](https://developer.apple.com/documentation/uikit/uidocumentpickerviewcontroller) view.\n\n|   | Android  | iOS  |\n|---|---|---|\n| FilePicker  | ![android-filepicker](https://user-images.githubusercontent.com/11634719/131224924-b68e20d0-ca53-4869-8f5e-061fb5cda778.png)  | ![filepicker-ios](https://user-images.githubusercontent.com/11634719/131225974-1644f016-b150-4bcb-97af-ff69f55378e4.png)|\n| FolderPicker  | ![folder-picker](https://user-images.githubusercontent.com/11634719/131225376-f1ff67a1-8190-4a74-92d0-4e544a8b2b38.png)| ![folder-picker-ios](https://user-images.githubusercontent.com/11634719/131225944-c398a160-48e1-4225-84d9-22cc21a9d64e.png)|\n\n\n## Install\n\n```bash\nnpm install https://github.com/ourcodeworld/capacitor-native-filepicker\nnpx cap sync\n```\n\n## How to use\n\n```javascript\nimport { CapacitorNativeFilePicker } from \"capacitor-native-filepicker\"; \n\n// A. Select folders\nlet folders = await CapacitorNativeFilePicker.launchFolderPicker({\n    limit: -1,\n    showHiddenFiles: true\n});\n\n// Outputs: [\"file://folder-path1\", \"file://folder-path2\"]\nconsole.log(folders);\n\n\n// B. Select files\nlet files = await CapacitorNativeFilePicker.launchFilePicker({\n    // No limit of files to select\n    limit: -1,\n    showHiddenFiles: true,\n    allowedExtensions: [\"jpg\", \"png\", \"gif\"]\n});\n\n// Outputs: [\"file://folder-path1/file.png\", \"file://folder-path2/file2.jpg\"]\nconsole.log(files);\n```\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`echo(...)`](#echo)\n* [`launchFilePicker(...)`](#launchfilepicker)\n* [`launchFolderPicker(...)`](#launchfolderpicker)\n* [`shareFile(...)`](#sharefile)\n* [`getFileUrlForUri(...)`](#getfileurlforuri)\n* [`createFile(...)`](#createfile)\n* [`writeToFile(...)`](#writetofile)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\n### echo(...)\n\n```typescript\necho(options: { value: string; }) =\u003e any\n```\n\n| Param         | Type                            |\n| ------------- | ------------------------------- |\n| **`options`** | \u003ccode\u003e{ value: string; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003eany\u003c/code\u003e\n\n--------------------\n\n\n### launchFilePicker(...)\n\n```typescript\nlaunchFilePicker(options: FilePickerOptions) =\u003e any\n```\n\n| Param         | Type                                                                                 |\n| ------------- | ------------------------------------------------------------------------------------ |\n| **`options`** | \u003ccode\u003e{ limit?: number; allowedExtensions?: any; showHiddenFiles?: boolean; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003eany\u003c/code\u003e\n\n--------------------\n\n\n### launchFolderPicker(...)\n\n```typescript\nlaunchFolderPicker(options: FolderPickerOptions) =\u003e any\n```\n\n| Param         | Type                                                        |\n| ------------- | ----------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ limit?: number; showHiddenFiles?: boolean; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003eany\u003c/code\u003e\n\n--------------------\n\n\n### shareFile(...)\n\n```typescript\nshareFile(options: { filepath: string; }) =\u003e any\n```\n\n| Param         | Type                               |\n| ------------- | ---------------------------------- |\n| **`options`** | \u003ccode\u003e{ filepath: string; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003eany\u003c/code\u003e\n\n--------------------\n\n\n### getFileUrlForUri(...)\n\n```typescript\ngetFileUrlForUri(options: { uri: string; }) =\u003e any\n```\n\n| Param         | Type                          |\n| ------------- | ----------------------------- |\n| **`options`** | \u003ccode\u003e{ uri: string; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003eany\u003c/code\u003e\n\n--------------------\n\n\n### createFile(...)\n\n```typescript\ncreateFile(options: CreateFileOptions) =\u003e any\n```\n\n| Param         | Type                                                                   |\n| ------------- | ---------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ directory: string; filename: string; content: string; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003eany\u003c/code\u003e\n\n--------------------\n\n\n### writeToFile(...)\n\n```typescript\nwriteToFile(options: WriteToFileOptions) =\u003e any\n```\n\n| Param         | Type                                                |\n| ------------- | --------------------------------------------------- |\n| **`options`** | \u003ccode\u003e{ filepath: string; content: string; }\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003eany\u003c/code\u003e\n\n--------------------\n\n\u003c/docgen-api\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fourcodeworld%2Fcapacitor-native-filepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fourcodeworld%2Fcapacitor-native-filepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fourcodeworld%2Fcapacitor-native-filepicker/lists"}