Skip to content

Instantly share code, notes, and snippets.

@DevShahidul
Created April 11, 2018 13:59
Show Gist options
  • Select an option

  • Save DevShahidul/7ff37d3dba27a30041e82fecb8237db8 to your computer and use it in GitHub Desktop.

Select an option

Save DevShahidul/7ff37d3dba27a30041e82fecb8237db8 to your computer and use it in GitHub Desktop.
See the example here >>> https://www.tutorialrepublic.com/faq/how-to-get-selected-file-name-from-input-type-file-using-jquery.php // We implemented this function to Credence project.
if($('#chosefile').length){
$('#chosefile').change(function(e){
var fileName = e.target.files[0].name;
$(".attach-btn-wrap span").text(fileName);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment