Save Canvas image with write file


#1

i am trying following code .

 SaveBlueprint(){
  var dataUrl = this._CANVAS.toDataURL('image/jpeg', 0.7);
   
     let result = this.file.writeFile(this.file.dataDirectory,'CanvasImages', dataUrl  );
    
    result.then ( data => {
     console.log('sucess');
    }).catch(error => {
      alert("Error" +error);
    })

Canvas image converted to dataUrl. Now trying this code to write image file. But getting error . How to do this please guide.


#2

Hi @sedar, did you solve it? Same issue here.