|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import type { AttachmentReqType, AttachmentType } from 'nocodb-sdk' |
|
|
|
|
import { populateUniqueFileName } from 'nocodb-sdk' |
|
|
|
|
import DOMPurify from 'isomorphic-dompurify' |
|
|
|
|
import { saveAs } from 'file-saver' |
|
|
|
|
import RenameFile from './RenameFile.vue' |
|
|
|
|
import { |
|
|
|
|
ColumnInj, |
|
|
|
@ -317,7 +318,7 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
|
|
|
|
|
async function downloadFile(item: AttachmentType) { |
|
|
|
|
const src = await getAttachmentSrc(item) |
|
|
|
|
if (src) { |
|
|
|
|
;(await import('file-saver')).saveAs(src, item.title) |
|
|
|
|
saveAs(src, item.title) |
|
|
|
|
} else { |
|
|
|
|
message.error('Failed to download file') |
|
|
|
|
} |
|
|
|
|