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.