From d2bcb129216bca20488d125b7d7ae58cd34ff1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D5=A1=D3=84=D5=A1?= Date: Tue, 19 Mar 2024 17:16:02 +0800 Subject: [PATCH] fix(nc-gui): incorrect maxAttachmentSize (#7900) --- packages/nc-gui/components/cell/attachment/utils.ts | 2 +- .../nc-gui/components/smartsheet/column/AttachmentOptions.vue | 2 +- packages/nc-gui/composables/useMultiSelect/convertCellData.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/cell/attachment/utils.ts b/packages/nc-gui/components/cell/attachment/utils.ts index 9ee1db4210..6e56487729 100644 --- a/packages/nc-gui/components/cell/attachment/utils.ts +++ b/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: ['*'], }), } diff --git a/packages/nc-gui/components/smartsheet/column/AttachmentOptions.vue b/packages/nc-gui/components/smartsheet/column/AttachmentOptions.vue index 414849058e..52578b54c8 100644 --- a/packages/nc-gui/components/smartsheet/column/AttachmentOptions.vue +++ b/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: ['*'], }), diff --git a/packages/nc-gui/composables/useMultiSelect/convertCellData.ts b/packages/nc-gui/composables/useMultiSelect/convertCellData.ts index 922c285554..b6151666db 100644 --- a/packages/nc-gui/composables/useMultiSelect/convertCellData.ts +++ b/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: ['*'], }), }