From 9fe25fa7b9bbc4369c2b30da65d6a280ec552285 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Wed, 20 Nov 2024 14:50:36 -0600 Subject: [PATCH] programming in bed is a bad idea --- server/src/middleware/file-upload.interceptor.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/middleware/file-upload.interceptor.ts b/server/src/middleware/file-upload.interceptor.ts index d0b04b50a2e5c..108a187e67b8c 100644 --- a/server/src/middleware/file-upload.interceptor.ts +++ b/server/src/middleware/file-upload.interceptor.ts @@ -136,6 +136,7 @@ export class FileUploadInterceptor implements NestInterceptor { } const hash = createHash('sha1'); + file.stream.on('data', (chunk) => hash.update(chunk)); this.defaultStorage._handleFile(request, file, (error, info) => { if (error) { hash.destroy();