From d134ee0552d64acef5b789103e5ac62899b6a07d Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 10 Mar 2025 20:50:57 +0200 Subject: [PATCH] fix(edit-docs): preserve attachment IDs --- src/services/import/zip.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/services/import/zip.ts b/src/services/import/zip.ts index 9cf943006..3f7d1ef8e 100644 --- a/src/services/import/zip.ts +++ b/src/services/import/zip.ts @@ -62,6 +62,10 @@ async function importZip(taskContext: TaskContext, fileBuffer: Buffer, importRoo } function getNewAttachmentId(origAttachmentId: string) { + if (opts?.preserveIds) { + return origAttachmentId; + } + if (!origAttachmentId.trim()) { // this probably shouldn't happen, but still good to have this precaution return "empty_attachment_id";