Browse Source

fix: prevent upload of files with same name

pull/6500/head
sreehari jayaraj 1 year ago
parent
commit
1c2c32be9f
  1. 3
      packages/nc-gui/components/cell/attachment/utils.ts

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

@ -138,6 +138,9 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
continue
}
}
// this prevent file with same names
const isFileNameAlreadyExist = attachments.value.some((el) => el.title === file.name)
if (isFileNameAlreadyExist) return
files.push(file)
}

Loading…
Cancel
Save