From ffe7876854817c29bc6a4cedc5b6f624e72798df Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 4 Nov 2021 14:21:05 +0100 Subject: [PATCH] fix directory upload missing progress --- packages/website/src/components/Uploader/Uploader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/website/src/components/Uploader/Uploader.js b/packages/website/src/components/Uploader/Uploader.js index f5241f42..cdb86e15 100644 --- a/packages/website/src/components/Uploader/Uploader.js +++ b/packages/website/src/components/Uploader/Uploader.js @@ -47,8 +47,9 @@ const Uploader = () => { const handleDrop = async (files) => { if (mode === "directory" && files.length) { const name = getRootDirectory(files[0]); // get the file path from the first file + const size = files.reduce((acc, file) => acc + file.size, 0); - files = [{ name, files }]; + files = [{ name, size, files }]; } setUploads((uploads) => [...files.map((file) => ({ id: nanoid(), file, mode, status: "enqueued" })), ...uploads]);