Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29631

I am trying to save images with RNFetchBlob.fs.dirs.CacheDir in android but ../Cache/ folder not show any saved image in device. in iOS it works fine

$
0
0
  1. This function I used to save data

async saveFileInDevice(absolutePath, filename) { images.map(data => { RNFetchBlob.config({ fileCache: true, appendExt: 'png', path: absolutePath +/${filename}.png, }) .fetch('GET', data.url, { //some headers .. }) .then(res => { // the temp file pathenter code here console.log('The file saved to ', res.path()); }); }); }

  1. for Retrieve

    RNFS.readDir(RNFetchBlob.fs.dirs.CacheDir +'/'+'FolderName')


Viewing all articles
Browse latest Browse all 29631


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>