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";