Skip to content

Commit

Permalink
Fix folder upload with inner folders
Browse files Browse the repository at this point in the history
  • Loading branch information
G4brym committed Nov 15, 2023
1 parent 0a8d292 commit 519ebd4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/dashboard/src/components/storage/DragAndDrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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('/')
Expand All @@ -88,6 +89,7 @@ export default {
folders[path].push(file)
}
console.log(folders)
this.uploadFiles(folders)
},
async uploadFiles (folders) {
Expand Down Expand Up @@ -128,6 +130,10 @@ export default {
}
}
if (!targetFolder.endsWith('/')) {
targetFolder = targetFolder + '/'
}
for (const file of files) {
uploadCount += 1
Expand Down

0 comments on commit 519ebd4

Please sign in to comment.