Last active
January 15, 2017 15:12
-
-
Save jacobtwlee/5bd9dd74cad25d4b94cc to your computer and use it in GitHub Desktop.
Reading the file
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 readFile(file) { | |
var reader = new FileReader(); | |
reader.onloadend = function () { | |
processFile(reader.result, file.type); | |
} | |
reader.onerror = function () { | |
alert('There was an error reading the file!'); | |
} | |
reader.readAsDataURL(file); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment