javascript browse folder path limit

Solutions on MaxInterview for javascript browse folder path limit by the best coders in the world

showing results for - "javascript browse folder path limit"
Valentino
22 Aug 2016
1<script type="text/javascript">
2function selectFolder(e) {
3    var theFiles = e.target.files;
4    var relativePath = theFiles[0].webkitRelativePath;
5    var folder = relativePath.split("/");
6    alert(folder[0]);
7}
8</script>
9
10<input type="file" id="FileUpload" onchange="selectFolder(event)" webkitdirectory mozdirectory msdirectory odirectory directory multiple />
11
12