Last active
January 20, 2020 18:12
-
-
Save john92paul/e7376d4fe464f6c70a5deaf508c26364 to your computer and use it in GitHub Desktop.
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
<script> | |
if(e.target.files) { | |
let imageFile = e.target.files[0]; //here we get the image file | |
var reader = new FileReader(); | |
reader.readAsDataURL(imageFile); | |
reader.onloadend = function (e) { | |
// Converted image is available here. | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment