Deeper
This commit is contained in:
parent
de783b6158
commit
bf3d04fc12
2 changed files with 8 additions and 4 deletions
|
@ -436,7 +436,7 @@ export default function Uploader(props: Props) {
|
|||
const collections: Collection[] = [];
|
||||
let collectionNameToFilesMap = new Map<
|
||||
string,
|
||||
(File | ElectronFile)[]
|
||||
File[] | ElectronFile[] | string[]
|
||||
>();
|
||||
if (strategy == "root") {
|
||||
collectionNameToFilesMap.set(
|
||||
|
|
|
@ -176,11 +176,15 @@ export function getImportSuggestion(
|
|||
// b => [e,f,g],
|
||||
// c => [h, i]]
|
||||
export function groupFilesBasedOnParentFolder(
|
||||
toUploadFiles: File[] | ElectronFile[],
|
||||
toUploadFiles: File[] | ElectronFile[] | string[],
|
||||
) {
|
||||
const collectionNameToFilesMap = new Map<string, (File | ElectronFile)[]>();
|
||||
const collectionNameToFilesMap = new Map<
|
||||
string,
|
||||
File[] | ElectronFile[] | string[]
|
||||
>();
|
||||
for (const file of toUploadFiles) {
|
||||
const filePath = file["path"] as string;
|
||||
const filePath =
|
||||
typeof file == "string" ? file : (file["path"] as string);
|
||||
|
||||
let folderPath = filePath.substring(0, filePath.lastIndexOf("/"));
|
||||
// If the parent folder of a file is "metadata"
|
||||
|
|
Loading…
Add table
Reference in a new issue