From 519ebd4f7fa56f612867815a13c322a9815b69e5 Mon Sep 17 00:00:00 2001 From: Gabriel Massadas Date: Wed, 15 Nov 2023 19:12:17 +0000 Subject: [PATCH] Fix folder upload with inner folders --- packages/dashboard/src/components/storage/DragAndDrop.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/dashboard/src/components/storage/DragAndDrop.vue b/packages/dashboard/src/components/storage/DragAndDrop.vue index 98860a8..992e9a4 100644 --- a/packages/dashboard/src/components/storage/DragAndDrop.vue +++ b/packages/dashboard/src/components/storage/DragAndDrop.vue @@ -76,6 +76,7 @@ export default { }) }, inputFolders (event) { + console.log(event.target) const folders = {} for (const file of event.target.files) { const lastIndex = file.webkitRelativePath.lastIndexOf('/') @@ -88,6 +89,7 @@ export default { folders[path].push(file) } + console.log(folders) this.uploadFiles(folders) }, async uploadFiles (folders) { @@ -128,6 +130,10 @@ export default { } } + if (!targetFolder.endsWith('/')) { + targetFolder = targetFolder + '/' + } + for (const file of files) { uploadCount += 1