I am busy building a small gallery that is pulled from my local file system. I have an element that gets the directory:
<input type=file webkitdirectory>
I then display all the images and videos in that directory on the page in a container.
At the moment for security reasons I only have access to the relative path so I had to add a hardcoded e:/downloads for it to find the files when I display them because the location of the file is on my desktop.
I want to extend this so I can choose a directory from anywhere on my local file system, but I need the aboslute path. Currently only IE gets me the absolute path, chrome returns a fakepath. I know how to get to the settings to allow local file system files to be included in IE, but I don't know how to enable it in Chrome. I would like to know if there is an option to allow this like in IE.
I have done searches around and most people say it is not possible, however I believe there must be a setting somewhere, I am hoping someone knows.
Here is my code just for kicks if you want to have a look:
https://jsfiddle.net/3mp1znx9/
Please note because it is hardcoded to e:/downloads you might want to change it to make it work for you.
You can open up the console and run the function called GetDirectory if you want to see the absolute path it tries to return. (you should also comment out the removal of the element after it has changed as well)
I hope my question was clear and not too long. Thank you.
Summary:
I want to access the absolute path of my local files from the element within Chrome. I can already do it in IE.