|
|
@ -1,4 +1,5 @@ |
|
|
|
import type { AttachmentReqType, AttachmentType } from 'nocodb-sdk' |
|
|
|
import type { AttachmentReqType, AttachmentType } from 'nocodb-sdk' |
|
|
|
|
|
|
|
import { populateUniqueFileName } from 'nocodb-sdk' |
|
|
|
import DOMPurify from 'isomorphic-dompurify' |
|
|
|
import DOMPurify from 'isomorphic-dompurify' |
|
|
|
import RenameFile from './RenameFile.vue' |
|
|
|
import RenameFile from './RenameFile.vue' |
|
|
|
import { |
|
|
|
import { |
|
|
@ -161,7 +162,7 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState( |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const fileName = populateUniqueFileName( |
|
|
|
const fileName = populateUniqueFileName( |
|
|
|
(file as AttachmentReqType).fileName ?? '', |
|
|
|
(file as AttachmentReqType).fileName ?? '', |
|
|
|
[...attachments.value, ...imageUrls], |
|
|
|
[...attachments.value, ...imageUrls].map((fn) => fn?.title || fn?.fileName || 'image'), |
|
|
|
(file as File)?.type || (file as AttachmentReqType)?.mimetype || '', |
|
|
|
(file as File)?.type || (file as AttachmentReqType)?.mimetype || '', |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -225,7 +226,7 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState( |
|
|
|
...uploadedFile, |
|
|
|
...uploadedFile, |
|
|
|
title: populateUniqueFileName( |
|
|
|
title: populateUniqueFileName( |
|
|
|
uploadedFile?.title, |
|
|
|
uploadedFile?.title, |
|
|
|
[...attachments.value, ...newAttachments], |
|
|
|
[...attachments.value, ...newAttachments].map((fn) => fn?.title || fn?.fileName || 'image'), |
|
|
|
uploadedFile?.mimetype, |
|
|
|
uploadedFile?.mimetype, |
|
|
|
), |
|
|
|
), |
|
|
|
}) |
|
|
|
}) |
|
|
|