Created
September 19, 2016 10:09
-
-
Save chengjianhua/fe9de2331204f2231df9a465a4139479 to your computer and use it in GitHub Desktop.
Read file when select 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
const fileReader = new FileReader(); | |
fileReader.readAsText(file); | |
fileReader.onloadend = (fileEvent) => { | |
const result = fileEvent.target.result; | |
console.log(result); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment