Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

13
  • 4
    The output String doesn't seem to look like base64?
    – quarks
    Commented Sep 9, 2013 at 1:07
  • 1
    @xybrek If you print read.result, you will see base64 in the string itself. Commented Apr 26, 2014 at 5:29
  • 46
    console.log( base64data.substr(base64data.indexOf(',')+1) );
    – palota
    Commented Aug 3, 2015 at 18:59
  • 19
    onloadend should come before readAsDataURL just in case something weird happens and it finishes loading before it reaches the next line of code. Obviously this would never happen but it's still good practice.
    – 3ocene
    Commented Dec 16, 2015 at 6:00
  • 8
    This answer is incorrect, it appends none-base64 characters to the front of the string. Commented Jan 19, 2016 at 23:41