From 6ee9f435fc42ac33b4592d6f0c7497bbf6fa5b90 Mon Sep 17 00:00:00 2001 From: kiranchavala Date: Mon, 13 Feb 2023 15:03:12 +0530 Subject: [PATCH 1/2] Added upper case JPEG extension for icon upload --- ui/src/components/view/UploadResourceIcon.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/view/UploadResourceIcon.vue b/ui/src/components/view/UploadResourceIcon.vue index 87cf9503ac06..a539f23f88b6 100644 --- a/ui/src/components/view/UploadResourceIcon.vue +++ b/ui/src/components/view/UploadResourceIcon.vue @@ -195,7 +195,7 @@ export default { this.options.img = '' }, beforeUpload (file) { - if (!/\.(svg|jpg|jpeg|png|bmp|SVG|JPG|PNG)$/.test(file.name)) { + if (!/\.(svg|jpg|jpeg|png|bmp|SVG|JPG|JPEG|PNG)$/.test(file.name)) { this.showAlert = true } const reader = new FileReader() From 2697e4b175aafb28f84cb5162d7aba6b93a88c32 Mon Sep 17 00:00:00 2001 From: kiranchavala Date: Mon, 20 Feb 2023 18:58:11 +0530 Subject: [PATCH 2/2] added case insensitive for image formats --- ui/src/components/view/UploadResourceIcon.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/view/UploadResourceIcon.vue b/ui/src/components/view/UploadResourceIcon.vue index a539f23f88b6..9b196852d8a5 100644 --- a/ui/src/components/view/UploadResourceIcon.vue +++ b/ui/src/components/view/UploadResourceIcon.vue @@ -195,7 +195,7 @@ export default { this.options.img = '' }, beforeUpload (file) { - if (!/\.(svg|jpg|jpeg|png|bmp|SVG|JPG|JPEG|PNG)$/.test(file.name)) { + if (!/\.(bmp|jpeg|jpg|png|svg)$/i.test(file.name)) { this.showAlert = true } const reader = new FileReader()