We are building a web application to help people organize their local files; it has a text input field in HTML5/JS.
Ideal functionality: user clicks on the text box and it lets them select a file or folder on their local drive, which passes the path of said file or folder to our server.
Is there a JS API or HTML5 method to find a path to a local file and folder?
Due to browser security, you cannot get the file location from a FILE input. For that same reason, you will notice that FILE inputs always get reset to blank after a postback. This is because the browser will not persist or expose the file path as a security measure.
©2020 All rights reserved.