feat(server): in upload folder, split the files into folders based on the first four of the files uuid (#6175)

This commit is contained in:
Zack Pollard
2024-01-04 20:45:16 +00:00
committed by GitHub
parent 2aaf941dda
commit 4cf1e553d2
6 changed files with 24 additions and 13 deletions
+6 -7
View File
@@ -281,12 +281,11 @@ export class StorageCore {
}
}
private static getNestedPath(folder: StorageFolder, ownerId: string, filename: string): string {
return join(
StorageCore.getFolderLocation(folder, ownerId),
filename.substring(0, 2),
filename.substring(2, 4),
filename,
);
static getNestedFolder(folder: StorageFolder, ownerId: string, filename: string): string {
return join(StorageCore.getFolderLocation(folder, ownerId), filename.substring(0, 2), filename.substring(2, 4));
}
static getNestedPath(folder: StorageFolder, ownerId: string, filename: string): string {
return join(this.getNestedFolder(folder, ownerId, filename), filename);
}
}