This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Description
We are downloading some images in our application. It's working beautifully on iOS. Here is our fetch:
const documentsDir = RNFetchBlob.fs.dirs.DocumentDir;
export const storyAssetsPath = `${documentsDir}/storyAssets`;
const downloadImage = async url => {
const id = uuid();
const filename = `${id}.jpg`;
const path = `${storyAssetsPath}/${filename}`;
await RNFetchBlob.config({
fileCache: true,
path
}).fetch('GET', url);
return filename;
};
Note the storyAssets folder that we're downloading the image into.
On Android, if the folder does not exist, it will not download the images correctly. It will seemingly succeed as the res comes back from the .fetch successfully but the images aren't actually there. If I manually create the folder on the device:
adb shell
root@vbox86p:/ $run-as com.greatjonesstreet
root@vbox86p:/ $ cd /data/data/com.greatjonesstreet
root@vbox86p:/data/data/com.greatjonesstreet $ mkdir storyAssets
the images download correctly. Any ideas?
react-native: 0.37.0
react-native-fetch-blob: 0.10.0