Browse Source

Merge pull request #7177 from nocodb/fix/attachment-in-shared-form

fix(nc-gui): non-image attachments in shared form
pull/7179/head
աӄա 1 year ago committed by GitHub
parent
commit
ef81f0617e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      packages/nc-gui/composables/useAttachment.ts

1
packages/nc-gui/composables/useAttachment.ts

@ -6,6 +6,7 @@ const useAttachment = () => {
const getPossibleAttachmentSrc = (item: Record<string, any>) => { const getPossibleAttachmentSrc = (item: Record<string, any>) => {
const res: string[] = [] const res: string[] = []
if (item?.data) res.push(item.data) if (item?.data) res.push(item.data)
if (item?.file) res.push(window.URL.createObjectURL(item.file))
if (item?.signedPath) res.push(`${appInfo.value.ncSiteUrl}/${item.signedPath}`) if (item?.signedPath) res.push(`${appInfo.value.ncSiteUrl}/${item.signedPath}`)
if (item?.signedUrl) res.push(item.signedUrl) if (item?.signedUrl) res.push(item.signedUrl)
if (item?.path) res.push(`${appInfo.value.ncSiteUrl}/${item.path}`) if (item?.path) res.push(`${appInfo.value.ncSiteUrl}/${item.path}`)

Loading…
Cancel
Save