From fd1d3d55bb23d85ae118b2e56e771ed4a138d11a Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 9 Oct 2024 15:27:35 +0100 Subject: [PATCH 1/2] TD-4256: Assessment and Case Resource - Allows to upload unsupported file formats (WebM and WMV) --- LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts | 2 +- .../LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj | 3 ++- .../Scripts/Post-Deploy/Script.PostDeployment.sql | 4 +++- .../Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts index 6973552c5..907438e2b 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts @@ -49,7 +49,7 @@ const MAX_FILE_SIZE = 10 * 1000 * 1000 * 1000; // 10GB // This list should correspond to the disallowed extensions contained in the FileType table const BLOCKED_FILE_EXTENSIONS = ['.app', '.asp', '.aspx', '.dll', '.dmg', '.exe', '.flv', '.f4v', '.js', '.jsp', - '.php', '.shtm', '.shtml', '.swf']; + '.php', '.shtm', '.shtml', '.swf','.webm']; const IMAGE_FILE_EXTENSIONS = ['.apng', '.avif', '.bmp', '.cur', '.gif', '.ico', '.jfif', '.jpeg', '.jpg', '.pjp', '.pjpeg', '.png', '.psd', '.svg', '.tif', '.tiff', '.webp']; diff --git a/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj b/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj index 6f39be1b9..48e5714c9 100644 --- a/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj +++ b/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj @@ -524,6 +524,7 @@ + @@ -594,4 +595,4 @@ - + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Script.PostDeployment.sql b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Script.PostDeployment.sql index 151c7c2c5..d9bcb7828 100644 --- a/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Script.PostDeployment.sql +++ b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Script.PostDeployment.sql @@ -81,4 +81,6 @@ UPDATE [resources].[ResourceVersion] SET CertificateEnabled = 0 WHERE VersionSta :r .\Scripts\InitialiseDataForEmailTemplates.sql :r .\Scripts\TD-2929_ActivityStatusUpdates.sql :r .\Scripts\InitialiseDataForEmailTemplates.sql -:r .\Scripts\AttributeData.sql \ No newline at end of file +:r .\Scripts\AttributeData.sql +:r .\Scripts\UpdateFileTypes.sql + diff --git a/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql new file mode 100644 index 000000000..dd412d790 --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql @@ -0,0 +1 @@ +update resources.FileType set NotAllowed =0 where Extension='webm' \ No newline at end of file From 14ea3f8083c19cf72076adf7306326550e3d4cd8 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 9 Oct 2024 17:00:14 +0100 Subject: [PATCH 2/2] Modified the script --- .../Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql index dd412d790..cc5d1935b 100644 --- a/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql +++ b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/UpdateFileTypes.sql @@ -1 +1 @@ -update resources.FileType set NotAllowed =0 where Extension='webm' \ No newline at end of file +update resources.FileType set NotAllowed =1 where Extension='webm' \ No newline at end of file