Created
February 1, 2019 19:25
-
-
Save azizimusa/0e7cffd015849cc9141cc82845aa2f21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You must save the image to device's picture directory. | |
import RNFS from "react-native-fs"; | |
var destPath = RNFS.PicturesDirectoryPath + '/yourpicture.jpg'; | |
RNFS.moveFile(data.uri, destPath) | |
.then((success) => { | |
console.log('file moved!'); | |
}) | |
.catch((err) => { | |
console.log("Error: " + err.message); | |
}); | |
//then in your Mailer.mail attachment | |
//the correct path should be /storage/emulated/0/Pictures/yourpicture.jpg | |
path: destPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment