react-native-file-selector
react-native-file-selector copied to clipboard
Folder selector
Can I use this for folder selector? I want to save file to a specific folder selected by user.
I have the same need! Would be great to have this feature!
I have taken this on for my own usage:
"react-native-file-selector": "https://github.com/crutchcorn/react-native-file-selector.git",
Then, just add chooseFolderMode: true, to the Show method
We're still waiting on https://github.com/nbsp-team/MaterialFilePicker/pull/72 to be merged before I can make a PR to this repo, however
I have taken this on for my own usage:
"react-native-file-selector": "https://github.com/crutchcorn/react-native-file-selector.git",Then, just add
chooseFolderMode: true,to theShowmethodWe're still waiting on nbsp-team/MaterialFilePicker#72 to be merged before I can make a PR to this repo, however
chooseFolderMode: false don't work can select folder
Given that I'm passing the variable directly to the Java method:
https://github.com/crutchcorn/react-native-file-selector/blob/master/android/src/main/java/ui/fileselector/RNFileSelectorModule.java#L81
It's likely a bug upstream in this PR:
https://github.com/nbsp-team/MaterialFilePicker/pull/72
Might want to report that there @wangfpp
@crutchcorn 感谢你的回复 我已经解决了
if (chooseFolderMode) {
picker = picker.withChooseFolderMode(chooseFolderMode);
}
but folder is '/storage/' need click twice? first click floder changed '/storage' second click selected folder is '/storage'