Created
January 3, 2020 01:39
-
-
Save hadrysmateusz/ee0ddffc74584f753fbe2ebc2f2397ad to your computer and use it in GitHub Desktop.
Markdium-Files in Client-Side JS: Ultimate Guide to Using Files in Web Applications
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 reader = new FileReader() | |
// readyState is 0, result is null | |
reader.onload = () => { | |
// readyState is 2, result is the file's content | |
} | |
reader.onerror = () => { | |
// readyState is 2, result is null | |
} | |
// readyState is 0, result is null | |
reader.readAsText(file) | |
// readyState is 1, result is null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment