0

I would like to get the download path for web browser clients.

How do I detect the default download path on a client PC in an asp.net core 3.1 project (c#)?

D.Man
  • 179
  • 1
  • 15
  • 2
    Why on earth do you need to know, where users are saving their files? BTW: You can't! – Poul Bak Dec 06 '21 at 19:23
  • 1
    This would be a huge privacy violation, and would expose sensitive details about users that you don't really need to know, such as their local account name which is probably based on their real name (ie `"C:\users\johnsmith\downloads")`. – user229044 Dec 07 '21 at 01:48
  • If my reply is helpful, please accept it as answer(click on the mark option beside the reply to toggle it from greyed out to fill in.), see https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – Jason Pan Dec 08 '21 at 09:16

1 Answers1

1

Poul Bak's comment is correct.

As we know, .net core 3.1 webapp just support broswer to access the resource from the webserver. It can't do anything in client side.

If we want to do something on the client side, we can only call it through Javascript under the premise of browser security.

And it's not possible to get broswer download path with javascript.

Jason Pan
  • 15,263
  • 1
  • 14
  • 29