I am struggling converting image to byte array using client side script. I have to convert image to byte array, and pass this array to web service , so that the web services
File.prototype.convertToBase64 = function(callback){
var FR= new FileReader();
FR.onload = function(e) {
callback(e.target.result)
};
FR.readAsDataURL(this);
}
and later call this function using this
var selectedFile = this.files[0];
selectedFile.convertToBase64(function(base64)
you get your base64 code.