Skip to content

Instantly share code, notes, and snippets.

@nurikk
Created February 22, 2020 07:05
Show Gist options
  • Save nurikk/fe69bd319f25fbacd95d18c6fcee7019 to your computer and use it in GitHub Desktop.
Save nurikk/fe69bd319f25fbacd95d18c6fcee7019 to your computer and use it in GitHub Desktop.
<script>document.querySelector('.custom-file-input').addEventListener('change', function (e) { var fileName = document.getElementById("customFile").files[0].name; var nextSibling = e.target.nextElementSibling;nextSibling.innerText = fileName })</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment