diff --git a/packages/nc-gui/components/cell/attachment/index.vue b/packages/nc-gui/components/cell/attachment/index.vue
index 1084dd268e..661482ef83 100644
--- a/packages/nc-gui/components/cell/attachment/index.vue
+++ b/packages/nc-gui/components/cell/attachment/index.vue
@@ -169,6 +169,8 @@ watch(selectedFile, (newVal, oldVal) => {
})
const openAttachmentModal = (e: Event) => {
+ if (!isEditAllowed.value) return
+
e?.stopPropagation()
isNewAttachmentModalOpen.value = true
}
@@ -350,9 +352,21 @@ onUnmounted(() => {
}}
-
-
+
+
{
+
+
+
+
+ {{ $t('labels.clickTo') }}
+
+ {{ $t('labels.browseFiles') }}
+ {{ $t('general.or') }}
+ {{ $t('labels.dragFilesHere') }}
+
+ {{ $t('labels.toUpload') }}
+
+
-
+
+
-
-
{{ $t('labels.dropHere') }}
-
+
+
{{ $t('labels.dropHere') }}
+
+
{
>
-
+
diff --git a/packages/nc-gui/components/cell/attachment/utils.ts b/packages/nc-gui/components/cell/attachment/utils.ts
index 4500a75b1d..dd98b5c8bc 100644
--- a/packages/nc-gui/components/cell/attachment/utils.ts
+++ b/packages/nc-gui/components/cell/attachment/utils.ts
@@ -314,7 +314,7 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
/** save files on drop */
async function onDrop(droppedFiles: FileList | File[] | null, event: DragEvent) {
- if (isReadonly.value) return
+ if (isReadonly.value || !isEditAllowed.value) return
if (droppedFiles) {
// set files