From a87cd8aa39872b35cdc26cd22fdb1ceac33e5f35 Mon Sep 17 00:00:00 2001 From: Hakan Shehu Date: Thu, 8 May 2025 11:22:54 +0200 Subject: [PATCH] Fix zip file size calculation --- apps/server/src/lib/tasks/s3-zip.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/server/src/lib/tasks/s3-zip.ts b/apps/server/src/lib/tasks/s3-zip.ts index ec194cee..675860b8 100644 --- a/apps/server/src/lib/tasks/s3-zip.ts +++ b/apps/server/src/lib/tasks/s3-zip.ts @@ -88,8 +88,8 @@ export class S3Zip { this.cancel(error); }); - this.archiver.on('progress', (progress) => { - this.zipFileSize = progress.fs.processedBytes; + this.passThrough.on('data', (chunk) => { + this.zipFileSize += chunk.length; }); this.passThrough.on('error', (error) => {