I am writing a small web service for a private project using C# and ASP.net. Part of this is uploading a text file via an HTML form:
<input type="file" name="File" id="File" />
for server side analysation. This works but now i need to analyse the local path also. So the server needs to get the local path as a string. But currently i have no real idea how to achieve that. One idea i have is to use javascript to catch the local path and add it to the form in a additional text field. But i am not very proficient in javascript so I do not know how to do it.
edit: On the server the file is directly converted (IFormFile -> MemoryStream) i never touch the filename in any way. But anyway i expected that security reasons are preventing what I initially wanted.
So when, in the end, the user has to give the path by itself, would it be possible to use this information directly for uploading the file? So that i can remove the type="file" input and have the user only perform action not two? But i guess that would be problematic also, because the browser would then need to have access to the file system right?