Node.js examples for String:Base 64
Convert byte Array To Base 64
function byteArrayToBase64(byteArray){ var binaryString = ""; for (var i=0; i<byteArray.byteLength; i++){ binaryString += String.fromCharCode(byteArray[i]); }/*w ww .j a v a 2 s .co m*/ var base64String = window.btoa(binaryString); return base64String; }