Merge pull request #6540 from mattslay/patch-1

Update file-object.md
This commit is contained in:
Cheng Zhao 2016-07-20 05:13:43 -06:00 committed by GitHub
commit 99524bf490

View file

@ -24,8 +24,9 @@ Example on getting a real path from a dragged-onto-the-app file:
};
holder.ondrop = (e) => {
e.preventDefault();
const file = e.dataTransfer.files[0];
console.log('File you dragged here is', file.path);
for (let f of e.dataTransfer.files) {
console.log('File(s) you dragged here: ', f.path);
}
return false;
};
</script>