react-native-file-selector icon indicating copy to clipboard operation
react-native-file-selector copied to clipboard

Folder selector

Open khanh-bh opened this issue 7 years ago • 5 comments

Can I use this for folder selector? I want to save file to a specific folder selected by user.

khanh-bh avatar May 17 '18 16:05 khanh-bh

I have the same need! Would be great to have this feature!

bartello1982 avatar Oct 17 '19 12:10 bartello1982

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

crutchcorn avatar Feb 13 '20 01:02 crutchcorn

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 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

wangfpp avatar May 29 '20 08:05 wangfpp

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 avatar May 29 '20 15:05 crutchcorn

@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'

wangfpp avatar Jun 03 '20 01:06 wangfpp