Created
April 9, 2020 07:05
-
-
Save annibuliful/e2a73e6a0c334d6eecc76f209bb90534 to your computer and use it in GitHub Desktop.
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
handleUpload(files){ | |
if (event.target.files && event.target.files[0]) { | |
const file = event.target.files[0]; | |
const reader = new FileReader(); | |
reader.onload = e => this.imageSrc = reader.result; | |
reader.readAsDataURL(file); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment