Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get browser download path with javascript

Tags:

I searched quite a lot for an answer on the web and found nothing.

Is there a way to get the download path of a browser via Javascript?

I don't want to set the path myself i just wanna know where my file goes after been downloaded by the user.

like image 359
Bolza Avatar asked Mar 23 '12 14:03

Bolza


2 Answers

That is not possible.

Pure browser-JavaScript is not be able to get information about the user's filesystem. The default download path might also contain sensible information, which is risky:

Imagine that one stores his downloads at C:\CompanyName\RealName\PhoneNumber\Adress\.

like image 158
Rob W Avatar answered Sep 30 '22 14:09

Rob W


Browsers are deliberately isolated from the local filesystem in order to prevent scripting attacks. You cannot get this information.

like image 23
Diodeus - James MacFarlane Avatar answered Sep 30 '22 13:09

Diodeus - James MacFarlane