Skip to content

document picker doesn't work in v3 #217

Description

@Arun-paramasivam

I'm using react-native-document-picker version: 3.2.0
react-native version: 0.58.6
react: 16.6.3

i installed debug app on android device(Redmi 4) with os version: 7.1.2.
i haven't checked on iOS.

i used the below function to call document picker.

pickMultiple = async() => {
try {
const res = await DocumentPicker.pick({
//error occurs at the below line
type: [DocumentPicker.types.images],
});
console.log(
res
);
} catch ( err ) {
console.log(err)
}
}

but the file manager doesn't get loaded and the catch part gets executed. on console it prints as

TypeError: Cannot read property 'images' of undefined
at _callee5$ (UploadPage.js:158)
at tryCatch (runtime.js:45)
at Generator.invoke [as _invoke] (runtime.js:271)
at Generator.prototype. [as next] (runtime.js:97)
at tryCatch (runtime.js:45)
at invoke (runtime.js:135)
at runtime.js:170
at tryCallTwo (core.js:45)
at doResolve (core.js:200)
at new Promise (core.js:66)

im not sure of what went wrong. i followed the exact documentation as in the gitHub page.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions