react-native-photo-editor icon indicating copy to clipboard operation
react-native-photo-editor copied to clipboard

Image not saved.

Open Lokendra2500 opened this issue 4 years ago • 7 comments

After editing the image when I clicked on save; then the image is not getting saved.

Lokendra2500 avatar Jul 30 '20 09:07 Lokendra2500

Same problem .. Onclick what is happening I dont know . I am getting only console output

pavanbhat1999 avatar Aug 01 '20 17:08 pavanbhat1999

you need to give an example and not just a sentence with no information about the code. I suppose the image get saved, but you do not refresh the link. It is a problem of react native. Add a random query in the new Local path, for example PATH = PATH + '?' + new Date().getTime()

hamzaouhssain1993 avatar Aug 12 '20 08:08 hamzaouhssain1993

you need to use cameraRoll.save inside onDone because image saved on cash not in galary

mohammedfaraj92 avatar Aug 12 '20 08:08 mohammedfaraj92

You can try this. It works.

 var photo = RNFS.DocumentDirectoryPath + "/photo.jpg"; 

 RNPhotoEditor.Edit({
  path: photo, 
  onDone: ( result ) => {
      // Note: the path of file saved after editing is different than the file opened. 
    console.log('on done', photo);
    console.log('on done result', result); // use this path to preview the saved image or overwrite the original image.
   // eg: result --> /storage/emulated/0/Pictures/PhotoEditorSDK/IMG_20200813_130958.jpg 
  },
  onCancel: () => {
    console.log('on cancel');
  },
});

samurailens avatar Aug 13 '20 07:08 samurailens

use 'file:///' and then append the URI

let image = 'file:///' + imageURI

umair-dpl avatar Oct 05 '20 09:10 umair-dpl

Hi anyone can help me? after pressing -> next error from right bottom (next button) I am getting same image path but I need different path of orignal image an also editied phot please help me

waheedshabeer avatar Apr 20 '21 12:04 waheedshabeer

you have to make changes in PhotoEditorActivity.java and change the path there.

umair-dpl avatar Apr 22 '21 17:04 umair-dpl