Created
December 21, 2018 11:50
-
-
Save gareth-cheeseman/e124640d7c98825393500613e6cadb30 to your computer and use it in GitHub Desktop.
Convert blob to data url js
This file contains hidden or 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
| export const blobToDataUrl = blob => { | |
| const reader = new FileReader(); | |
| reader.readAsDataURL(blob); | |
| reader.onloadend = () => { | |
| const base64Data = reader.result; | |
| return base64Data; | |
| }; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment