I try to display windows explorer view as a static web page. We have to read a root folder and display all the folders and files as a static webpage. We have to use only client side programming. I know it is possible with the help of server side programming. My question is, is it possible to achieve it in front end without involving backend. I have only one problem which is reading the folder structure. How can I do it? I need to load a html file(ex..C:\workspace\treeview\index.html) in the browser and it should display all the files and folder. Also share your suggestions to achieve the above scenario?
Asked
Active
Viewed 37 times
1 Answers
0
The short answer here is no. Browsers are disallowed from accessing the local file system in this way. Even a simple iframe with a local src will throw errors in the Console.
<iframe src="C:\" width="600" height="480"></iframe>
Without getting into (or fully understanding) them, there are severe security implications if JavaScript is allowed to access the local filesystem. Imagine how dangerous malicious JS code could be if it was allowed.

James Allen
- 969
- 4
- 16