Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

Can't get path for directory #19

Closed
gj94gj94ao4 opened this issue Feb 25, 2022 · 2 comments
Closed

Can't get path for directory #19

gj94gj94ao4 opened this issue Feb 25, 2022 · 2 comments
Labels
question Further information is requested

Comments

@gj94gj94ao4
Copy link

Work fine with react-native-document-picker to pick files and get their path.
but can't get path for a directory.

const path = await pickDirectory()
if (path !== null) {
  const realPath = getPath(path.uri);
  // Error: Exception in HostFunction: java.lang.UnsupportedOperationException: Unsupported Uri 
  // content://com.android.externalstorage.documents/tree/primary%3A...
  console.log(realPath);
}
@demchenkoalex
Copy link
Member

See #18 I think maybe this library is not needed at all now. I am not an Android developer, and only found this solution to pick files somewhere, not sure I will be able to adapt to directories as well.

@demchenkoalex demchenkoalex added the question Further information is requested label Apr 10, 2022
@demchenkoalex
Copy link
Member

react-native-documents/document-picker#70 (comment) also mentioned in the README of the document picker repo as well, is the correct way to retrieve the path. This repo will be archived.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants