Resolving the Issue of Fakepath in JavaScript
var path = "C:\\fakepath\\example.doc";
var filename = path.replace(/^.*\\/, "");
console.log(filename);
document.getElementById("yourInputElement").files[0].name
var path = "C:\\fakepath\\example.doc";
var filename = path.replace(/^.*\\/, "");
console.log(filename);
document.getElementById("yourInputElement").files[0].name