Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to detect default images folder via Javascript?

I would like that in my webpage the user would be able to upload images.

When the user clicks on a particular div, image, button or whatever, a Browse Dialog will be open. Similar to this:

document.getElementById('buttonFile').onclick = function(){
	document.getElementById("file").click();
}
#file{
  display: none;
}
<input type="file" id="file">
<button id="buttonFile" type="button">Open File Dialog</button>

But the default folder where the images usually are stored usually change between OS and languages. I would like that on this Browse Dialog the default images folder will be open, regardless of the OS or the language.

For example, on my Windows 10 on English it is stored on This PC named as Pictures.

Is there a way to open the Browse Dialog always on the default images folder?

Thanks in advance!

like image 908
Francisco Romero Avatar asked May 17 '16 11:05

Francisco Romero


1 Answers

No.

The page author has absolutely no influence over which directory the browse dialog will open in.

like image 127
Quentin Avatar answered Nov 09 '22 10:11

Quentin