I have an input form and i am getting filename in this way:
$(document).on('change', '.inputfile', function() {
var name = ($(this).val().split('\\').pop());
}
This gives me only the name with extension (i.e. example.csv). I would like to have the full filename if file selected is in a subfolder, like test/example.csv. How can i have this using jquery/javascript?