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>
pull/28723/head
moversity 2026-05-31 14:27:35 +02:00 committed by Jason Rasmussen
parent 963862b1b9
commit 43ac1afdb6
No known key found for this signature in database
GPG Key ID: 2EF24B77EAFA4A41
1 changed files with 1 additions and 0 deletions

View File

@ -426,6 +426,7 @@ const uploadFile = async (input: string, stats: Stats): Promise<AssetMediaRespon
redirect: 'error',
headers: headers as Record<string, string>,
body: formData,
window: null,
});
if (response.status !== 200 && response.status !== 201) {
throw new Error(await response.text());