v2-6773191095ae169d55c178a0dddee77b_1200x500.jpg
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>upload dialog</title>
</head>
<body>
<input id="dialog" type="file" webkitdirectory />
<script>
dialog.onchange = function(e) {
var files = this.files;
var table = {};
for (var i = 0; i < files.length; i++) {
var f = files[i];
var dt = new Date(f.lastModified);
table[i] = {
path: f.webkitRelativePath,
size: f.size,
modified: dt.toLocaleString()
};
}
console.table(table);
};
</script>
</body>
</html>
网友评论