diff --git a/plugin/editor/cheditor5/popup/js/image.html5.js b/plugin/editor/cheditor5/popup/js/image.html5.js index 35624ae8f..c3e3f46c4 100644 --- a/plugin/editor/cheditor5/popup/js/image.html5.js +++ b/plugin/editor/cheditor5/popup/js/image.html5.js @@ -439,7 +439,7 @@ function fileFilterError(file) { function explorerFileFilterError(file) { alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + - "익스플로러 10 이하의 환경에서는 gif, png, jpg 사진 파일만 \n전송할 수 있습니다."); + "익스플로러 환경에서는 gif, png, jpg 사진 파일만 \n전송할 수 있습니다."); } function imgComplete(img, imgSize, boxId) { @@ -967,9 +967,9 @@ DoUpload.prototype = { file = files[i]; if (!file.type.match(fileTypeRe)) { - // 엣지(ie 11)를 제외한 ie브라우저인지 체크 + // 엣지를 제외한 ie브라우저인지 체크 var agent = navigator.userAgent.toLowerCase(); - if ( !(navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) && (agent.indexOf("msie") != -1) ) { + if (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1) { explorerFileFilterError(file.name); } else { FileFilterError(file.name); diff --git a/plugin/editor/cheditor5/popup/js/image.html5.m.js b/plugin/editor/cheditor5/popup/js/image.html5.m.js index b79a1b37c..e50c3389f 100644 --- a/plugin/editor/cheditor5/popup/js/image.html5.m.js +++ b/plugin/editor/cheditor5/popup/js/image.html5.m.js @@ -439,7 +439,7 @@ function fileFilterError(file) { function explorerFileFilterError(file) { alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + - "익스플로러 10 이하의 환경에서는 gif, png, jpg 사진 파일만 전송할 수 있습니다."); + "익스플로러 환경에서는 gif, png, jpg 사진 파일만 \n전송할 수 있습니다."); } function imgComplete(img, imgSize, boxId) { @@ -967,9 +967,9 @@ DoUpload.prototype = { file = files[i]; if (!file.type.match(fileTypeRe)) { - // 엣지(ie 11)를 제외한 ie브라우저인지 체크 + // 엣지를 제외한 ie브라우저인지 체크 var agent = navigator.userAgent.toLowerCase(); - if ( !(navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) && (agent.indexOf("msie") != -1) ) { + if (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1) { explorerFileFilterError(file.name); } else { FileFilterError(file.name); diff --git a/plugin/editor/ckeditor4/plugins/uploadimage/plugin.js b/plugin/editor/ckeditor4/plugins/uploadimage/plugin.js index 3d855547a..d506d2166 100644 --- a/plugin/editor/ckeditor4/plugins/uploadimage/plugin.js +++ b/plugin/editor/ckeditor4/plugins/uploadimage/plugin.js @@ -69,10 +69,16 @@ if ( !uploadUrl ) { return; } - - // Handle images which are available in the dataTransfer. - fileTools.addUploadWidget( editor, 'uploadimage', { - supportedTypes: /image\/(jpeg|png|gif|bmp|webp)/, + var supportedType = ''; + var agent = navigator.userAgent.toLowerCase(); + if (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1) { + supportedType = ''; + } else { + supportedType = /image\/(jpeg|png|gif|bmp|webp)/; + } + // Handle images which are available in the dataTransfer. + fileTools.addUploadWidget( editor, 'uploadimage', { + supportedTypes: supportedType, uploadUrl: uploadUrl, fileDialog: fileDialog, @@ -107,8 +113,14 @@ editor.on("fileUploadRequest", function( evt ) { // 이미지 업로드 시작 체크 - if(typeof(editor_chk_upload) != "undefined") { - editor_chk_upload = false; + var fileLoader = evt.data.fileLoader; + if(fileLoader.file.type.match(/image\/(jpeg|png|gif|bmp|webp)/) == null){ + this.showNotification('익스플로러 환경에서는 jpg / gif / png 파일만 업로드 가능합니다.','warning'); + return false; + }else { + if(typeof(editor_chk_upload) != "undefined") { + editor_chk_upload = false; + } } }); @@ -124,7 +136,6 @@ img.setAttribute( 'src', res.url ); if(typeof(res.width) != 'undefined') img.setAttribute( 'width', res.width ); if(typeof(res.height) != 'undefined') img.setAttribute( 'height', res.height ); - editor.insertElement(img); uploadType = ''; // 구분값 초기화 diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js b/plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js index 96c7c0edd..87e5941cf 100644 --- a/plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js +++ b/plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js @@ -85,8 +85,11 @@ jQuery(function ($) { data.context = $('
  • ').addClass("sort_list").appendTo(this.dreg_area_list); $.each(data.files, function (index, file) { if (!preload && !othis.filter.test(file.type)) { + var agent = navigator.userAgent.toLowerCase(); + var msg = ''; + msg = (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1)? "익스플로러 환경에서는 gif, png, jpg 파일만 \n전송할 수 있습니다.":"이미지만 허용합니다."; data.context.remove(); - alert('이미지만 허용합니다.'); + alert(msg); return true; } var node = $('
    ')