diff --git a/packages/nc-gui/components/cell/attachment/utils.ts b/packages/nc-gui/components/cell/attachment/utils.ts index fd06f806b2..453aa345e8 100644 --- a/packages/nc-gui/components/cell/attachment/utils.ts +++ b/packages/nc-gui/components/cell/attachment/utils.ts @@ -18,6 +18,7 @@ import { useProject, watch, } from '#imports' +import { IsFormInj } from '~/context' import MdiPdfBox from '~icons/mdi/pdf-box' import MdiFileWordOutline from '~icons/mdi/file-word-outline' import MdiFilePowerpointBox from '~icons/mdi/file-powerpoint-box' @@ -37,6 +38,8 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState( const isPublic = inject(IsPublicInj, ref(false)) + const isForm = inject(IsFormInj, ref(false)) + const meta = inject(MetaInj)! const column = inject(ColumnInj)! @@ -162,7 +165,7 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState( } /** our currently visible items, either the locally stored or the ones from db, depending on isPublicForm status */ - const visibleItems = computed(() => (isPublic.value ? storedFiles.value : attachments.value)) + const visibleItems = computed(() => (isPublic.value && isForm.value ? storedFiles.value : attachments.value)) watch(files, (nextFiles) => nextFiles && onFileSelect(nextFiles))