chunkify function
Implementation
List<List<FileMetadata>> chunkify(List<FileMetadata> files,
[int chunkSize = 10]) {
// Divide files into chunks for parallel processing and uploading
final fileChunks = <List<FileMetadata>>[];
for (var i = 0; i < files.length; i += chunkSize) {
fileChunks.add(files.sublist(i, min(i + chunkSize, files.length)));
}
return fileChunks;
}