From afa836181c2e12b4e33e1c1560da601ed5d12666 Mon Sep 17 00:00:00 2001 From: moversity <148445403+moversity@users.noreply.github.com> Date: Wed, 3 Jun 2026 15:19:35 +0000 Subject: [PATCH] fix(cli): prevent out-of-memory on file upload due to undici storing the request body (#28723) fix(cli): add fetch param to prevent OOM of upload Issue due to undici storing the entire request body in memory. Related undici bug report: https://github.com/nodejs/undici/issues/4058 Fixes https://github.com/immich-app/immich/issues/28720 Signed-off-by: moversity <148445403+moversity@users.noreply.github.com> --- packages/cli/src/commands/asset.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/cli/src/commands/asset.ts b/packages/cli/src/commands/asset.ts index 2c6430c83a..b0a9037289 100644 --- a/packages/cli/src/commands/asset.ts +++ b/packages/cli/src/commands/asset.ts @@ -426,6 +426,8 @@ const uploadFile = async (input: string, stats: Stats): Promise, body: formData, + // eslint-disable-next-line unicorn/no-null + window: null, }); if (response.status !== 200 && response.status !== 201) { throw new Error(await response.text());