feat: add config variable to adjust chunk size

This commit is contained in:
Elias Schneider
2024-04-04 20:54:21 +02:00
parent 82871ce5dc
commit 0bfbaea49a
4 changed files with 18 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ export class FileService {
}
// If the sent chunk index and the expected chunk index doesn't match throw an error
const chunkSize = 10 * 1024 * 1024; // 10MB
const chunkSize = this.config.get("share.chunkSize");
const expectedChunkIndex = Math.ceil(diskFileSize / chunkSize);
if (expectedChunkIndex != chunk.index)