Fix:Drag and drop upload limits to 100 items per folder #560

This commit is contained in:
advplyr 2022-05-03 17:41:49 -05:00
parent d869a9836e
commit db48a486e5

View File

@ -112,12 +112,23 @@ export default {
items: [] items: []
}) })
var newtreemap = currtreemap.items[currtreemap.items.length - 1] var newtreemap = currtreemap.items[currtreemap.items.length - 1]
dirReader.readEntries((entries) => {
let entriesPromises = [] let entriesPromises = []
for (let entr of entries) entriesPromises.push(traverseFileTreePromise(entr, newtreemap)) // readEntries returns 100 items max, continue calling readEntries until empty
function readEntries() {
dirReader.readEntries((entries) => {
if (entries.length > 0) {
for (let entr of entries) {
entriesPromises.push(traverseFileTreePromise(entr, newtreemap))
}
readEntries()
} else {
resolve(Promise.all(entriesPromises)) resolve(Promise.all(entriesPromises))
}
}) })
} }
readEntries()
}
}) })
} }