1

I have a Browse button wherein I've to show a dialog box to allow the user to browse to the specific folder that he/she wants to upload.

The only thing I've to do is to get that folder's absolute path for all systems.

I tried something but to no success:

<input type="file" value="Browser Folder" onChange="selectFolder(event)" webkitdirectory directory>

<script type="text/javascript">
    function selectFolder(e) {
        var theFiles = e.target.files;
        console.log(theFiles);
        console.log(e);
    }
</script>

The eFiles only returns the list of files. How can I get the absolute path for the selected folder.

Is there any library or something that allows a user to select a folder and get it's absolute path irrespective of the system he/she is using.

Suggestions are welcome. Thanks in advance!

EDIT

I need to access the folder via dialog box and get the absolute path of selected folder.

Abhishek
  • 1,974
  • 5
  • 31
  • 67
  • Possible duplicate of [How to get full path of selected file on change of using javascript, jquery-ajax?](https://stackoverflow.com/questions/15201071/how-to-get-full-path-of-selected-file-on-change-of-input-type-file-using-jav) – Fred Gandt Jun 29 '17 at 06:07

0 Answers0