Last active
March 23, 2024 22:36
-
-
Save nelsondev19/e38fa6ae612ee0ff4ba973d74e56657a 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
const imageBinary = null | |
const changeImagenUpdate = (e) => { | |
e.preventDefault(); | |
const imageSelected = e.target.files[0]; | |
const reader = new FileReader(); | |
reader.readAsDataURL(imageSelected); | |
reader.onload = e => { | |
e.preventDefault(); | |
imageBinary = e.target.result | |
} | |
} | |
const imageEl = document.getElementById('imagenId') | |
imageEl.src = imageBinary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment