Created
December 7, 2016 14:20
-
-
Save miguel-leon/6eb96100d6fcc0658af04bdc3eeecb5f to your computer and use it in GitHub Desktop.
Convert ArrayBuffer to base64 string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arrayBufferToBase64(buffer) { | |
return btoa(String.fromCharCode.apply(String, new Uint8Array(buffer))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment