Actually, I want to select folder path and not upload but I am okay with the solution provided on here.
document.getElementById("folder").addEventListener("change", function(event) {
var output = document.querySelector("ul");
var files = event.target.files;
for (var i=0; i<files.length; i++) {
var item = document.createElement("li");
item.innerHTML = files[i].webkitRelativePath;
output.appendChild(item);
};
}, false);
label {
font-weight: bold;
display: block;
margin-bottom: 10px;
}
body {
font-family: sans-serif;
}
<h1>Folder upload</h1>
<label for="folder">Select folder</label>
<input type="file" id="folder" webkitdirectory multiple/>
<h2>Selected Files</h2>
<ul>
</ul>
But I am getting this post conformation message.
I want to know is there any way (any library anything) to avoid that confirmation box?