android version is ‘6.0.1‘
react-native version is ‘ 0.43.1’
Here is the code:
var formUrl = common.baseUrl+'/enclosures/IMG_20170617_093953.jpg';
const downloadDest = `${RNFS.DocumentDirectoryPath}/IMG_20170617_093953.jpg`;
const options = {
fromUrl: formUrl,
toFile: downloadDest,
background: true,
begin: (res) => {
console.log(res);
},
progress: (res) => {
}
};
try {
const ret = RNFS.downloadFile(options);
ret.promise.then(res => {
console.log(res);
}).catch(err => {
console.log(err)
});
}
catch (e) {
console.log(e)
}
Hi, I'm not sure if you can view it from file manager, can u try this code to see content of document directory:
RNFS.readDir(RNFS.DocumentDirectoryPath).then((res)=>{console.log(res)});
This will verify your issue.
@ngrj @ngrj
yes ,I can get an array,like this.

so the file exists, afaik it just that you can't access content of document directory from other applications, only your own application can access it.
@ngrj Ok,thank you very much.
Most helpful comment
Hi, I'm not sure if you can view it from file manager, can u try this code to see content of document directory:
RNFS.readDir(RNFS.DocumentDirectoryPath).then((res)=>{console.log(res)});This will verify your issue.