From d5d2fe16306df94eb14f5f9bbb174db1d87f2811 Mon Sep 17 00:00:00 2001 From: David Dias Date: Wed, 29 Mar 2017 06:27:30 +0100 Subject: [PATCH] fix: chrome nows treat filelist as an object instead of an array --- examples/transfer-files/public/js/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/transfer-files/public/js/app.js b/examples/transfer-files/public/js/app.js index 15db88637a..962e392f75 100644 --- a/examples/transfer-files/public/js/app.js +++ b/examples/transfer-files/public/js/app.js @@ -136,7 +136,8 @@ function onDrop (event) { }) } - files.map((file) => { + for (let i = 0; i < files.length; i++) { + const file = files[i] readFileContents(file) .then((buffer) => { return node.files.add([{ @@ -151,7 +152,7 @@ function onDrop (event) { .join('
') }) .catch(onError) - }) + } } /*