ASP .NET - Local file directory using Chrome

0

I have the following code snippet:

<div class='upload-border'>
   <input class='file-upload' id="fileUpload" runat="server" type="file" name='upload'/>
</div>

I need to get the local directory of the file I just selected. With C #, when I use fileUpload.Value in Internet Explorer, it's returning me the correct directory, for example: C: \ temp \ myfile.txt. In Chrome, it just returns the filename.

I need the full directory as I need to save this content.

How can I get the complete directory with C #?

    
asked by anonymous 29.05.2018 / 13:17

1 answer

1

Friend due to security policy issues google chrome does not show the path of the file, it always shows a "fakepath" instead of the local path of the machine, what you can do in C # is to submit the form that is the your input file and get the file with

Request.Files["nameInput"].

I hope I have helped.

    
29.05.2018 / 13:41