Is it possible to get the full path of the selected file using pure javascript or angular 2? I need the user to pick the excel file which I then need to send to c# WEB API controller method for further processing.
For now I got this:
HTML
<input type="file" id="selectedFile" class="button-pop-up-footer1">
js
var selectedFilePath = document.getElementById("selectedFile").value;
But when i select the file located at: C:\users\owner\desktop\myfile.xls, I get the path as C:\fakepath\myfile.xls.
Anyone got ideas on how to resolve this and get the full path to the file without compromising the security?