2017-09-26 41 views
2

具有以下工作在Android的反应机软件包:反应本地访问内容:// URI失败

"react-native": "0.47.2" 
"react-native-document-picker": "2.0.0" (removing the ovveride to compile with 0.47) 
"react-native-fetch-blob": "^0.10.8" 

我得到一个内容:// URI同时使用反应本地文档,选择器或反应本地联系人(为化身)。 的URI,如:

'content://com.android.providers.media.documents/document/image%3A99' 

尝试访问该文件失败,“统计错误:未能一一列出路径为null,是不存在的,或它不是一个文件夹'”

const urlDecoded = decodeURIComponent(url); 
return new Promise((resolve, reject) => { 
    RNFetchBlob.fs.stat(urlDecoded) 
    .then(resolve) 
    .catch(reject); 
}); 

任何想法如何访问该文件?访问它的真实路径?

回答