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

How this works #18

Closed
brunofariasd opened this issue Jan 8, 2022 · 2 comments
Closed

How this works #18

brunofariasd opened this issue Jan 8, 2022 · 2 comments
Labels
question Further information is requested

Comments

@brunofariasd
Copy link

Hello. I am trying to use this library to convert uri to path but it just returns error.

example:

getPath(content://com.android.externalstorage.documents/tree/primary%3AAndroid%2Fmedia)

this return:

Error: Exception in HostFunction: java.lang.UnsupportedOperationException: Unsupported Uri content://com.android.externalstorage.documents/tree/primary%3AAndroid%2Fmedia

RN: 0.66
Latest version lib instaled

@demchenkoalex
Copy link
Member

Hey, sorry for the late response!

Did the update to RN 0.67 just now and tested this,

getPath(content://com.android.providers.media.documents/document/document%3A44)

returns

/data/user/0/com.example/cache/temp8143442312317355734dummy.pdf

From the error message I see that URI is not supported, maybe some files do not work that way?

Also, from the original issue thread, there were a couple suggestions after my comment, like this one react-native-documents/document-picker#70 (comment), maybe this library is not needed at all.

@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