DocumentPicker.show({
filetype: [DocumentPickerUtil.images(),DocumentPickerUtil.plainText()],
}, (error, res) => {
// Android
console.log(
"Document Image Picker Response", res
);
// uploadable content
let file_obj = {
uri:res.uri,
type:res.type,
name:res.fileName,
size:res.fileSize
}
this.setState({picker_response:file_obj},()=>{
this.addExternalFile()
})
});
Not working on iOS at all :(
Same here can't access to local photos on iOS. iCloud Drive and Recently Deleted available only.
Using filetype: [DocumentPickerUtil.allFiles()] but still getting only iCloud Drive and Recently Deleted too.
have you given proper certificates to your IOS app
Working with v3 still the same, listing only the iCloud Drive
$ npm install git://github.com/Elyx0/react-native-document-picker.git#v3 --save
"react-native-document-picker": "git://github.com/Elyx0/react-native-document-picker.git#v3",
import DocumentPicker from 'react-native-document-picker'
// ...
try {
const res = await DocumentPicker.pick({
type: [DocumentPicker.types.allFiles]
})
// ...
} catch ( err ) {
if ( DocumentPicker.isCancel(err) ) {
// User cancelled the picker, exit any dialogs or menus and move on
} else {
throw err
}
}
return null
}
Same here
Any news about this?
@dantman sorry to bother, but do you know how to deal with this issue?
https://github.com/Elyx0/react-native-document-picker/issues/20
https://github.com/Elyx0/react-native-document-picker/issues/23
https://github.com/Elyx0/react-native-document-picker/issues/45
https://github.com/Elyx0/react-native-document-picker/issues/51
https://github.com/Elyx0/react-native-document-picker/issues/72
https://github.com/Elyx0/react-native-document-picker/issues/113
https://github.com/Elyx0/react-native-document-picker/issues/117
@rochapablo Photos aren't my target right now, and I'm working on another project for now (why I wasn't able to publish v3). But if photos were my target and both iOS and Android offered photos through a different api than the document picker, then I would use a different library to interact with that part of the OS API. I would not expect the library that is just supposed to be a wrapper around the document picker API on both platforms to also hardcode handling for other platform APIs.