I am unable to open image after I store it to cache directory. In my case, I am creating file in which I am storing the base 64 image data. But that file is not opened and show corrupted message.
Here is my code snippet:
var base64Img = noexifbase64.split("base64,")[1];
var cachepath = RNFetchBlob.fs.dirs.CacheDir + /${TimeStamp}.jpg
RNFetchBlob.fs.createFile(cachepath, RNFetchBlob.base64.encode(base64Img), 'base64')
I am unable to open image after I store it to cache directory. In my case, I am creating file in which I am storing the base 64 image data. But that file is not opened and show corrupted message.
Here is my code snippet:
var base64Img = noexifbase64.split("base64,")[1]; var cachepath = RNFetchBlob.fs.dirs.CacheDir +
/${TimeStamp}.jpg
RNFetchBlob.fs.createFile(cachepath, RNFetchBlob.base64.encode(base64Img), 'base64')