diff --git a/packages/nc-gui/components/smartsheet/column/AttachmentOptions.vue b/packages/nc-gui/components/smartsheet/column/AttachmentOptions.vue index c4827d0505..7015c2b985 100644 --- a/packages/nc-gui/components/smartsheet/column/AttachmentOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/AttachmentOptions.vue @@ -25,35 +25,15 @@ setAdditionalValidations({ ...validators, }) -// TBC -const maxNumberOfAttachmentsLowerLimit = 1 -const maxNumberOfAttachmentsUpperLimit = 10000 -const maxNumberOfAttachmentsDefaultLimit = 10 -const maxNumberOfAttachmentsLimit = appInfo.value.ee - ? Math.min( - maxNumberOfAttachmentsUpperLimit, - Math.max(maxNumberOfAttachmentsLowerLimit, appInfo.value.ncMaxAttachmentsAllowed ?? maxNumberOfAttachmentsDefaultLimit), - ) - : maxNumberOfAttachmentsDefaultLimit - -// TBC -const maxAttachmentSizeDefaultLimit = 20 -const maxAttachmentSizeLowerLimit = 1 -const maxAttachmentSizeUpperLimit = 10000 -const maxAttachmentSizeLimit = appInfo.value.ee - ? Math.min( - maxAttachmentSizeUpperLimit, - Math.max(maxAttachmentSizeLowerLimit, appInfo.value.ncMaxAttachmentsAllowed ?? maxAttachmentSizeDefaultLimit), - ) - : maxAttachmentSizeDefaultLimit - // set default value vModel.value.meta = { - // Maximum Number of Attachments per cell - maxNumberOfAttachments: maxNumberOfAttachmentsDefaultLimit, - // Maximum File Size per file - maxAttachmentSize: maxAttachmentSizeDefaultLimit, - unsupportedAttachmentMimeTypes: [], + ...(appInfo.value.ee && { + // 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, + unsupportedAttachmentMimeTypes: [], + }), ...vModel.value.meta, } @@ -69,23 +49,13 @@ const filterOption = (val: string, option: Option) => { - + - +