Browse Source

fix(nc-gui): incorrect maxAttachmentSize (#7900)

pull/7831/head
աӄա 9 months ago committed by GitHub
parent
commit
d2bcb12921
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      packages/nc-gui/components/cell/attachment/utils.ts
  2. 2
      packages/nc-gui/components/smartsheet/column/AttachmentOptions.vue
  3. 2
      packages/nc-gui/composables/useMultiSelect/convertCellData.ts

2
packages/nc-gui/components/cell/attachment/utils.ts

@ -76,7 +76,7 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
// Maximum Number of Attachments per cell
maxNumberOfAttachments: Math.max(1, +appInfo.value.ncMaxAttachmentsAllowed || 50) || 50,
// Maximum File Size per file
maxAttachmentSize: Math.max(1, +appInfo.value.ncMaxAttachmentsAllowed || 20) || 20,
maxAttachmentSize: Math.max(1, +appInfo.value.ncAttachmentFieldSize || 20) || 20,
supportedAttachmentMimeTypes: ['*'],
}),
}

2
packages/nc-gui/components/smartsheet/column/AttachmentOptions.vue

@ -30,7 +30,7 @@ vModel.value.meta = {
// Maximum Number of Attachments per cell
maxNumberOfAttachments: Math.max(1, +appInfo.value.ncMaxAttachmentsAllowed || 50) || 50,
// Maximum File Size per file
maxAttachmentSize: Math.max(1, +appInfo.value.ncMaxAttachmentsAllowed || 20) || 20,
maxAttachmentSize: Math.max(1, +appInfo.value.ncAttachmentFieldSize || 20) || 20,
// allow all mime types by default
supportedAttachmentMimeTypes: ['*'],
}),

2
packages/nc-gui/composables/useMultiSelect/convertCellData.ts

@ -146,7 +146,7 @@ export default function convertCellData(
// Maximum Number of Attachments per cell
maxNumberOfAttachments: Math.max(1, +args.appInfo.ncMaxAttachmentsAllowed || 50) || 50,
// Maximum File Size per file
maxAttachmentSize: Math.max(1, +args.appInfo.ncMaxAttachmentsAllowed || 20) || 20,
maxAttachmentSize: Math.max(1, +args.appInfo.ncAttachmentFieldSize || 20) || 20,
supportedAttachmentMimeTypes: ['*'],
}),
}

Loading…
Cancel
Save