From 6b293876dae11d790ecaf4049d082f4540bd8153 Mon Sep 17 00:00:00 2001 From: projectSylas Date: Tue, 29 Jun 2021 07:52:11 +0000 Subject: [PATCH] =?UTF-8?q?cheditor=20=EC=9D=B5=EC=8A=A4=ED=94=8C=EB=A1=9C?= =?UTF-8?q?=EB=9F=AC=20=EC=95=88=EB=82=B4=EB=AC=B8=EA=B5=AC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/editor/cheditor5/popup/js/image.html5.js | 13 ++++++++++++- plugin/editor/cheditor5/popup/js/image.html5.m.js | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/plugin/editor/cheditor5/popup/js/image.html5.js b/plugin/editor/cheditor5/popup/js/image.html5.js index 40540d923..35624ae8f 100644 --- a/plugin/editor/cheditor5/popup/js/image.html5.js +++ b/plugin/editor/cheditor5/popup/js/image.html5.js @@ -437,6 +437,11 @@ function fileFilterError(file) { "gif, png, jpg, webp 사진 파일만 전송할 수 있습니다."); } +function explorerFileFilterError(file) { + alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + + "익스플로러 10 이하의 환경에서는 gif, png, jpg 사진 파일만 \n전송할 수 있습니다."); +} + function imgComplete(img, imgSize, boxId) { var resizeW, resizeH, M, elem; img.setAttribute("border", '0'); @@ -962,7 +967,13 @@ DoUpload.prototype = { file = files[i]; if (!file.type.match(fileTypeRe)) { - fileFilterError(file.name); + // 엣지(ie 11)를 제외한 ie브라우저인지 체크 + var agent = navigator.userAgent.toLowerCase(); + if ( !(navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) && (agent.indexOf("msie") != -1) ) { + explorerFileFilterError(file.name); + } else { + FileFilterError(file.name); + } continue; } this.list.push(file); diff --git a/plugin/editor/cheditor5/popup/js/image.html5.m.js b/plugin/editor/cheditor5/popup/js/image.html5.m.js index c70470178..b79a1b37c 100644 --- a/plugin/editor/cheditor5/popup/js/image.html5.m.js +++ b/plugin/editor/cheditor5/popup/js/image.html5.m.js @@ -437,6 +437,11 @@ function fileFilterError(file) { "gif, png, jpg, webp 사진 파일만 전송할 수 있습니다."); } +function explorerFileFilterError(file) { + alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + + "익스플로러 10 이하의 환경에서는 gif, png, jpg 사진 파일만 전송할 수 있습니다."); +} + function imgComplete(img, imgSize, boxId) { var resizeW, resizeH, M, elem; img.setAttribute("border", '0'); @@ -962,10 +967,16 @@ DoUpload.prototype = { file = files[i]; if (!file.type.match(fileTypeRe)) { - fileFilterError(file.name); + // 엣지(ie 11)를 제외한 ie브라우저인지 체크 + var agent = navigator.userAgent.toLowerCase(); + if ( !(navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) && (agent.indexOf("msie") != -1) ) { + explorerFileFilterError(file.name); + } else { + FileFilterError(file.name); + } continue; } - this.list.push(file); + this.list.push(file); } if (this.list.length < 1) {