Open qzlu-cyber opened 2 years ago
I created a correction PR but it still hasn't been accepted, it seems to me the error still persists in production!
Sorry, in production my PR works correctly
I solved this problem temporarily after using base64. Thank you very much
I solved it like
import ImgToBase64 from 'react-native-image-base64';
import ImagePicker from "react-native-image-crop-picker";
openGalleryClickProfile() {
ImagePicker.openPicker({
width: 300,
height: 400,
cropping: true,
}).then((image) => {
console.log("Imagemime", image);
this.onPressAddImage(image)
});
}
onPressAddImage(image){
ImgToBase64.getBase64String(image.path)
.then((base64String) => {
const str = `data:${image.mime};base64,${base64String}`
this.richText.current?.insertImage(
str
);
})
.catch((err) => {
console.log("base64:Image:", err)
})};
I created a correction PR but it still hasn't been accepted, it seems to me the error still persists in production!
Can you link me to that PR? I'd like to see your implementation for fixing it because I'm also facing the same issue
It doesn't show up when I've selected an image. it prompts me 'Not allowed to load local resource: file:///Users/xxxxxx/Library/Developer/CoreSimulator/Devices/xxxxxx/data/Containers/Data/Application/xxxxx/tmp/xxx.jpg'. This is my code:
When I click to add an image, onPressAddImage is called, but the image is not displayed. I have the same problem with this #217 But according to his method I didn't solve the problem. Could you please help me? @rafaelboniolo