I am using HTML input file to select the file. I have tried in JQUERY but I it returns fake path.
$("#inputfile").val()
I want to get selected file actual path e.g
D:\Documents\image.png
So I have tried to upload the file in ASP.NET MVC and check the path but It also gives file name.
[HttpPost]
public ActionResult GetFileName() {
var result = "";
if (Request.Files.Count > 0)
{
result = Request.Files[0].FileName;
}
return Json(result);
}
Is there any solution to get the path. I know this a browser security feature but I have to entertain the client requirement. Please suggest the solution if exist.
Thank you