Open KOKOdeveloper opened 4 months ago
Did you find a solution yet? @KOKOdeveloper
Not yet, I'm waiting some of the contributors to present solution. Currently I just add "mimeTypes: ['image/heic']," to filter just "HEIC" format to complete the flow, but that's not okey from UX perspective want to show JPG as well ..
Try https://github.com/itinance/react-native-fs maybe that package can read those files. This is not an issue with this package should fix as it returns the correct uri
Hello I'm using this library to get photos from gallery and it works perfect with HEIC format. I use like this
But this code doesn't work if the file is "JPEG". So when I use this
const data64 = await ReactNativeBlobUtil.fs.readFile( imageData.node.image.filepath ?? '', 'base64', );
It return [Error: No such file 'file:///Users/*****/Library/Developer/CoreSimulator/Devices/26DA6F20-97EA-439A-9727-15D3926440A2/data/Media/DCIM/100APPLE/IMG_0006.JPG
or with the image.uri:
const data64 = await ReactNativeBlobUtil.fs.readFile( image.uri, 'base64', );
It return "error such file 'ph://CC95F08C-88C3-4012-9D6D-64A413D254B3/L0/001"
I realise that when I use "CameraRoll.iosGetImageDataById" with option for convert HEIC format It create temp "filePath" that is returned and it works fine for reading base 64, path example (/Users/***/Library/Developer/CoreSimulator/Devices/26DA6F20-97EA-439A-9727-15D3926440A2/data/Containers/Data/Application/8B7CF391-64E8-4489-BB8F-49D5DE1B2C5A/tmp/IMG_0111.JPEG).
Can someone help me how to get correct file path for JPG how I can use ReactNativeBlobUtil.fs.readFile to get base 64.?