{"id":18484870,"url":"https://github.com/prscx/react-native-file-selector","last_synced_at":"2025-04-05T07:05:15.039Z","repository":{"id":49002177,"uuid":"122491234","full_name":"prscX/react-native-file-selector","owner":"prscX","description":"React Native: Native File Selector","archived":false,"fork":false,"pushed_at":"2021-07-01T12:18:12.000Z","size":1763,"stargazers_count":307,"open_issues_count":50,"forks_count":59,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T06:03:51.149Z","etag":null,"topics":["andriod","ios","react-native"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prscX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-22T14:41:35.000Z","updated_at":"2024-11-23T13:23:19.000Z","dependencies_parsed_at":"2022-09-07T16:04:24.699Z","dependency_job_id":null,"html_url":"https://github.com/prscX/react-native-file-selector","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prscX%2Freact-native-file-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prscX%2Freact-native-file-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prscX%2Freact-native-file-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prscX%2Freact-native-file-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prscX","download_url":"https://codeload.github.com/prscX/react-native-file-selector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299831,"owners_count":20916190,"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":["andriod","ios","react-native"],"created_at":"2024-11-06T12:43:25.854Z","updated_at":"2025-04-05T07:05:15.023Z","avatar_url":"https://github.com/prscX.png","language":"Java","funding_links":["https://www.buymeacoffee.com/prscX"],"categories":[],"sub_categories":[],"readme":"\n\n\u003ch1 align=\"center\"\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/react-native-file-selector\"\u003e\u003cimg src=\"http://img.shields.io/npm/v/react-native-file-selector.svg?style=flat\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/prscX/react-native-file-selector/pulls\"\u003e\u003cimg alt=\"PRs Welcome\" src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/prscX/react-native-file-selector#License\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/react-native-file-selector.svg?style=flat\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n    ReactNative: Native File Selector (Android/iOS)\n\nIf this project has helped you out, please support us with a star 🌟\n\u003c/h1\u003e\n\nThis library is a ReactNative Bridge around native libraries. It allows you to natively select/pick file from device file system:\n\n\n| **Android: [nbsp-team/MaterialFilePicker/](https://github.com/nbsp-team/MaterialFilePicker)**             |\n| ----------------- |\n| \u003cimg src=\"https://i.imgur.com/mjxs05n.png\" /\u003e                  |\n\n\n\u003e **Note**: It allows you to pick file without using Intent/Third Party Software\n\n| **iOS: [marmelroy/FileBrowser](https://github.com/marmelroy/FileBrowser)**             |\n| ----------------- |\n| \u003cimg src=\"https://camo.githubusercontent.com/5ea19d119a5426eeca3edbe750c280617f804aa0/687474703a2f2f692e67697068792e636f6d2f336f3667615936794c516b686a696f6b35572e676966\" /\u003e                  |\n\n\n\u003e **Note**: It allows you to select only local files associate to app sandbox.\n\n\n## 📖 Getting started\n`$ npm install react-native-file-selector --save`\n\n\u003e This library is supports RN60 and above\n\n- **iOS**\n\n\u003e **iOS Prerequisite:** Please make sure `CocoaPods` is installed on your system\n\n\t- Add the following to your `Podfile` -\u003e `ios/Podfile` and run pod update:\n\n\n```\n  use_native_modules!\n\n  pod 'RNFileSelector', :path =\u003e '../node_modules/react-native-file-selector/ios'\n\n  use_frameworks! :linkage =\u003e :static\n\n  pod 'FileBrowser', :git =\u003e 'https://github.com/prscX/FileBrowser'\n\n  # Follow [Flipper iOS Setup Guidelines](https://fbflipper.com/docs/getting-started/ios-native)\n  # This is required because iOSPhotoEditor is implemented using Swift and we have to use use_frameworks! in Podfile\n  $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',\n    'CocoaAsyncSocket', 'ComponentKit', 'Flipper-DoubleConversion',\n    'Flipper-Glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',\n    'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']\n  \n  pre_install do |installer|\n    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}\n    installer.pod_targets.each do |pod|\n        if $static_framework.include?(pod.name)\n          def pod.build_type;\n            Pod::BuildType.static_library\n          end\n        end\n      end\n  end\n```\n\n  - Please make sure [**Flipper iOS Setup Guidelines**](https://fbflipper.com/docs/getting-started/ios-native/) steps are added to Podfile, since iOSPhotoEditor is implemented using Swift and we have to use use_frameworks! in Podfile\n\n\n- **Android**\n\n- Add below color attributes in your app's `android/app/src/main/res/values/color.xml` file. You can provide your own color codes.\n\n```\n    \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n    \u003cresources\u003e\n        \u003ccolor name=\"colorPrimary\"\u003e#3F51B5\u003c/color\u003e\n        \u003ccolor name=\"colorPrimaryDark\"\u003e#303F9F\u003c/color\u003e\n        \u003ccolor name=\"colorAccent\"\u003e#FF4081\u003c/color\u003e\n    \u003c/resources\u003e\n```\n\n## 💻 Usage\n\n`import RNFileSelector from 'react-native-file-selector';`\n\n- API Way\n\n```javascript\nRNFileSelector.Show(\n    {\n        title: 'Select File',\n        onDone: (path) =\u003e {\n            console.log('file selected: ' + path)\n        },\n        onCancel: () =\u003e {\n            console.log('cancelled')\n        }\n    }\n)\n```\n\n- React Way\n\n```javascript\n\u003cRNFileSelector title={\"Select File\"} visible={this.state.visible} onDone={() =\u003e {\n    console.log(\"file selected: \" + path);\n}} onCancel={() =\u003e {\n    console.log(\"cancelled\");\n}}/\u003e\n```\n\n\n## 💡 Props\n\n\n| Prop              | Type       | Default | Note                                                                                                       |\n| ----------------- | ---------- | ------- | ---------------------------------------------------------------------------------------------------------- |\n| `title`       | `string`     |         | Title on the toolbar\n| `closeMenu`      | `string`     |   true      | Color of tint\n| `hiddenFiles: Android`       | `bool`     |  false       | If true it shows hidden files as well                                                            |\n| `path` | `string` |         | Path of directory                                                   |  |\n| `filter`    | `string`     |         | Filter to sort the files                                        |  |\n| `filterDirectories: Android`      | `bool`     |         | Filter should be applied on directories or not \n| `onDone`      | `func`     |         | Function called when file is selected       |  |\n| `onCancel`      | `func`     |         | Function called when file selector is closed without selecting any file | |\n| `visible`      | `bool`     |    false     | To invoke file selector | |\n\n\n\u003e **Note**\n\u003e - **Filter**\n\u003e    - **Android:** Please find [regex/Pattern](https://developer.android.com/reference/java/util/regex/Pattern.html) for defining filter\n\u003e    - **iOS:** Array of file extension needs to be ignore\n\n\n## ✨ Credits\n\n- Android: [nbsp-team/MaterialFilePicker/](https://github.com/nbsp-team/MaterialFilePicker)\n- iOS: [marmelroy/FileBrowser](https://github.com/marmelroy/FileBrowser)\n\n## 🤔 How to contribute\nHave an idea? Found a bug? Please raise to [ISSUES](https://github.com/prscX/react-native-file-selector/issues).\nContributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.\n\n## 💫 Where is this library used?\nIf you are using this library in one of your projects, add it in this list below. ✨\n\n\n## 📜 License\nThis library is provided under the Apache License.\n\nRNFileSelector @ [prscX](https://github.com/prscX)\n\n## 💖 Support my projects\nI open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).\n\nHowever, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:\n* Starring and sharing the projects you like 🚀\n* If you're feeling especially charitable, please follow [prscX](https://github.com/prscX) on GitHub.\n\n  \u003ca href=\"https://www.buymeacoffee.com/prscX\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: auto !important;width: auto !important;\" \u003e\u003c/a\u003e\n\n  Thanks! ❤️\n  \u003cbr/\u003e\n  [prscX.github.io](https://prscx.github.io)\n  \u003cbr/\u003e\n  \u003c/ Pranav \u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprscx%2Freact-native-file-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprscx%2Freact-native-file-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprscx%2Freact-native-file-selector/lists"}