Skip to content

Instantly share code, notes, and snippets.

@poga
Created August 11, 2013 23:49
Show Gist options
  • Save poga/6207431 to your computer and use it in GitHub Desktop.
Save poga/6207431 to your computer and use it in GitHub Desktop.
<html>
<head>
</head>
<body>
<input id="file_input" type="file" webkitdirectory directory />
<a href="#" id="button">Scan</a>
</body>
<script>
document.getElementById("file_input").onchange = function (e) {
var files = e.target.files;
for (var i=0, f; f = files[i]; ++i) {
console.log(f.webkitRelativePath);
}
};
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment