{"id":18869169,"url":"https://github.com/sandlz/filepicker","last_synced_at":"2026-02-14T04:30:15.985Z","repository":{"id":91133369,"uuid":"116899223","full_name":"sandlz/FilePicker","owner":"sandlz","description":"Plugin for file picker.","archived":false,"fork":false,"pushed_at":"2018-01-12T03:14:49.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T23:32:21.686Z","etag":null,"topics":["cordova-plugin","filepicker"],"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/sandlz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-10T02:50:35.000Z","updated_at":"2018-01-10T03:00:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6980f6b-c89b-41d5-9f30-20e1d5233ba5","html_url":"https://github.com/sandlz/FilePicker","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandlz%2FFilePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandlz%2FFilePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandlz%2FFilePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandlz%2FFilePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandlz","download_url":"https://codeload.github.com/sandlz/FilePicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239816510,"owners_count":19701753,"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":["cordova-plugin","filepicker"],"created_at":"2024-11-08T05:16:04.217Z","updated_at":"2026-02-14T04:30:15.945Z","avatar_url":"https://github.com/sandlz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FilePicker - 文件选择器\n\n版权声明：此项目基于开源库：[LFilePicker](https://github.com/leonHua/LFilePicker) 修改而来. 特此感谢LFilePicker作者。\n\n支持平台\n\n- Android\n\n## 用法\n\n```\ncordova plugin add /xxxx/xxx/FilePicker\n```\n\n```\n# 添加样式\nstyles.xml中添加resources目录下styles.xml中的样式\n\n# 添加依赖\nbuild.gradle\ncompile 'com.android.support:appcompat-v7:22.2.0'\ncompile 'com.android.support:recyclerview-v7:22.2.0'\n```\n\n默认配置\n\n```javascript\nvar defaultConfig = {\n\t\t// 标题\n\t\ttitle: '选择文件',\n\t\t// 导航栏背景色\n\t\ttitleBg: '#1baaeb',\n\t\t// 文件图标样式\n\t\ticonStyle: '',\n\t\t// 返回按钮样式\n\t\tbackIconStyle: '',\n\t\t// 多选\n\t\tmultiSelect: true,\n\t\t// 返回上一级目录显示的文字\n\t\tbackText: '上一级',\n\t\t// 文件最大数\n\t\tmaxNum: 10,\n\t\t// 超出选择文件数提示\n\t\tmaxNumTips: '已达到最大选择数量,请移除部分选择的文件',\n\t\t// 文件过滤器(默认不过滤)\n\t\tfileFilter: '',\n\t\t// 未选择提示\n\t\tnoChooseTips: '至少选择一个文件',\n\t\t// 选择模式 0 文件模式 1 文件夹模式 2 Both\n\t\tchooseMode: 2\n\t};\n```\n\n调用\n\n```javascript\nif (window.plugins \u0026\u0026 window.plugins.FilePicker) {\n          var options = {\n\n          };\n          window.plugins.FilePicker.chooseFile(options,\n            function (data) {\n              console.log(data.fileList);\n            }, function (error) {\n              console.log(error);\n          })\n        }\n```\n\n返回\n\n```\n路径数组\n# 示例\n[\n    \"/storage/0/xxxx.jpg\",\n    \"/storage/0/xxxx2.jpg\"\n]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandlz%2Ffilepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandlz%2Ffilepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandlz%2Ffilepicker/lists"}