@klejz0r wrote:
Guys i’ve got an issue while doing this function.
const options: CameraOptions = { quality: 100, allowEdit: true, sourceType: source, saveToPhotoAlbum: true, correctOrientation: true, encodingType: this.camera.EncodingType.JPEG, destinationType: this.camera.DestinationType.FILE_URI } this.camera.getPicture(options).then((imageData) => { //needs to import file plugin //split the file and the path from FILE_URI result let filename = imageData.substring(imageData.lastIndexOf('/')+1); let path = imageData.substring(0,imageData.lastIndexOf('/')+1); //then use the method reasDataURL btw. var_picture is ur image variable this.file.readAsDataURL(path, filename).then(res=> var_picture = res ); }) ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'split' of undefined
Posts: 1
Participants: 1