Open pasllani opened 2 years ago
@pasllani Were you able to fix this?
This functionality is surprisingly broken lol. I think it's writing to a directory it doesn't have access to read from.
So what I ended up doing is using the includeBase64
property when using ImagePicker.openCamera
or ImagePicker.openPicker
.
Then I took that base64 data from image.data
and saved it using RNFS.writeFile("imagePath", image, 'base64')
.
This method may be a LOT slower since we're storing base64 data directly. Have yet to test it on a large data set.
So for now this functionality is STILL BROKEN. This is just a temporary workaround.
@pasllani-USX Will surely check the workaround you told. Thanks for your response.
same here
same here
same
Same issue.Not getting file which is located in application.My image path is 'Users/*******/Documents/reactProjs/CodeStructure/src/assets/icons/icon_collectibles.jpeg
if I put statically it works but I want to set it dynamically.Is it possible for iOS?
I've been struggling with this problem for a couple of hours. Although the error says the source file doesn't exist, I've realized the problem relates to the destination directory doesn't exist. After I have created the directory with RNFS.mkdir, it's been fixed.
I am using
React Native Image Crop Picker
to select an image from the photo library and attempting to useRNFS.copyFile
command to copy this image to a specified directory.RNFS.readDir
sees the file is there and I try to use the result.path from it to copy the file over but it says file doesn't exist. Here is the code I'm using:And here is the output I'm getting:
So it's clearly seeing the file but
RNFS.copyFile
is having an issue finding it.