I have a code to Open the Camera from browser. How to improve this code so that i can save the file in local directory.
document.getElementById('takephoto').onclick = function(){
    console.log(navigator.camera);
    navigator.camera.getPicture(function(imageUri){
        var lastphoto = document.getElementById("thephoto");
        alert("nicephoto");
        lastphoto.innerHTML = "<img src='" + imageUri + "'style='width:100%;'/>"
    }, null, null);
}
With this code I can access the Camera
 
     
    