fix: upload more than 100 files in directory (#317)
This commit is contained in:
parent
8590f3e841
commit
cd84dff87f
1 changed files with 21 additions and 13 deletions
|
@ -732,8 +732,16 @@ async function addFileEntries(entries, dirs) {
|
|||
new Uploader(file, dirs).upload();
|
||||
});
|
||||
} else if (entry.isDirectory) {
|
||||
const dirReader = entry.createReader()
|
||||
dirReader.readEntries(entries => addFileEntries(entries, [...dirs, entry.name]));
|
||||
const dirReader = entry.createReader();
|
||||
|
||||
const successCallback = entries => {
|
||||
if (entries.length > 0) {
|
||||
addFileEntries(entries, [...dirs, entry.name]);
|
||||
dirReader.readEntries(successCallback);
|
||||
}
|
||||
};
|
||||
|
||||
dirReader.readEntries(successCallback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue