fix(nc-gui): allow duplicate attachment name if user copy paste from another cell

This commit is contained in:
Ramesh Mane
2024-02-20 06:06:23 +00:00
parent c5e0a076a2
commit 2eb0abf7d5
4 changed files with 47 additions and 14 deletions

View File

@@ -201,7 +201,10 @@ export default function convertCellData(
const newAttachments: AttachmentType[] = []
for (const att of attachments) {
newAttachments.push({ ...att, title: populateUniqueFileName(att?.title, [...oldAttachments, ...newAttachments]) })
newAttachments.push({
...att,
title: populateUniqueFileName(att?.title, [...oldAttachments, ...newAttachments], att?.mimetype),
})
}
return JSON.stringify([...oldAttachments, ...newAttachments])
} else if (files.length && attachments.length) {