Skip to content

access content://com.android.providers.media.documents/document/image%3A99 #351

Closed
@EyalSi

Description

@EyalSi

I'm getting a content uri in android while using react-native-document-picker or react-native-contacts (for the avatars).
URIs like:
'content://com.android.providers.media.documents/document/image%3A99'
Trying to access this file fails with "File does not exist"

const urlDecoded = decodeURIComponent(url);
RNFS.stat(urlDecoded)
.then((file) => {
console.log("RNFS URL SUCCESS", file);
})
.catch((err) => {
console.log("RNFS URL ERROR", err);
});

Any idea how to access the file?
10x

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions