From 74d50bb9533917aff65783d24ee9f227b5da0578 Mon Sep 17 00:00:00 2001 From: "sabrina.bongiovanni" Date: Mon, 13 Jan 2025 17:31:57 +0100 Subject: [PATCH] fix: added specific pathname in upload file restriction --- .../volto/components/manage/Contents/ContentsUploadModal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx b/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx index 6fd003843..c117cf1d1 100644 --- a/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx +++ b/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx @@ -198,7 +198,7 @@ class ContentsUploadModal extends Component { // this is enough to identify this only case bc even if another page is called 'modulistica', it will have 'File' // and "Modulo" as addable type const showFileRestraint = - this.props.pathname.includes('modulistica') && + getBaseUrl(this.props.pathname).match(/\/servizi\/.*\/modulistica\/?$/) && !this.props.types.some( (type) => type.id === 'File' || type.id === 'Modulo', );