From 58f5e9b5cdab1704fdbede92844d176964b3d571 Mon Sep 17 00:00:00 2001 From: kagla Date: Wed, 23 Jun 2021 09:15:56 +0900 Subject: [PATCH] =?UTF-8?q?cheditor5=20=EC=97=90=20webp=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EC=97=85=EB=A1=9C=EB=93=9C=20=ED=95=A0=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95.?= =?UTF-8?q?=20=EC=9B=80=EC=A7=81=EC=9D=B4=EB=8A=94=20gif,=20webp=20?= =?UTF-8?q?=EC=9D=98=20=EC=9D=B4=EB=AF=B8=EC=A7=80=EA=B0=80=20=EC=A0=95?= =?UTF-8?q?=EC=A7=80=EB=90=98=EC=96=B4=20=EC=97=85=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EB=90=98=EA=B3=A0=20=EC=9E=88=EC=9D=8C.=20=EC=9B=90=EB=9E=98?= =?UTF-8?q?=20=EA=B7=B8=EB=9F=B0=EA=B2=83=20=EA=B0=99=EC=9D=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/editor/cheditor5/imageUpload/upload.php | 6 ++++-- plugin/editor/cheditor5/popup/image.html5.html | 2 +- plugin/editor/cheditor5/popup/image.html5.m.html | 2 +- plugin/editor/cheditor5/popup/js/image.html5.js | 4 ++-- plugin/editor/cheditor5/popup/js/image.html5.m.js | 4 ++-- plugin/editor/cheditor5/popup/js/image.js | 2 +- plugin/editor/cheditor5/popup/js/image_url.js | 4 ++-- 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/plugin/editor/cheditor5/imageUpload/upload.php b/plugin/editor/cheditor5/imageUpload/upload.php index 0d675e91b..9594f8c7a 100644 --- a/plugin/editor/cheditor5/imageUpload/upload.php +++ b/plugin/editor/cheditor5/imageUpload/upload.php @@ -9,10 +9,11 @@ if( !function_exists('che_reprocessImage') ){ function che_reprocessImage($file_path, $callback){ $MIME_TYPES_PROCESSORS = array( - "image/gif" => array("imagecreatefromgif", "imagegif"), + "image/gif" => array("imagecreatefromgif", "imagegif"), "image/jpg" => array("imagecreatefromjpeg", "imagejpeg"), "image/jpeg" => array("imagecreatefromjpeg", "imagejpeg"), - "image/png" => array("imagecreatefrompng", "imagepng"), + "image/png" => array("imagecreatefrompng", "imagepng"), + "image/webp" => array("imagecreatefromwebp", "imagewebp"), "image/bmp" => array("imagecreatefromwbmp", "imagewbmp") ); @@ -84,6 +85,7 @@ switch ($type) { case "jpeg": case "gif": case "png": + case "webp": $found = true; } diff --git a/plugin/editor/cheditor5/popup/image.html5.html b/plugin/editor/cheditor5/popup/image.html5.html index ed91fd34e..aceda6140 100644 --- a/plugin/editor/cheditor5/popup/image.html5.html +++ b/plugin/editor/cheditor5/popup/image.html5.html @@ -14,7 +14,7 @@
- image button diff --git a/plugin/editor/cheditor5/popup/image.html5.m.html b/plugin/editor/cheditor5/popup/image.html5.m.html index 0e88dd423..0f9debb67 100644 --- a/plugin/editor/cheditor5/popup/image.html5.m.html +++ b/plugin/editor/cheditor5/popup/image.html5.m.html @@ -14,7 +14,7 @@
- image button diff --git a/plugin/editor/cheditor5/popup/js/image.html5.js b/plugin/editor/cheditor5/popup/js/image.html5.js index 37b9a4559..40540d923 100644 --- a/plugin/editor/cheditor5/popup/js/image.html5.js +++ b/plugin/editor/cheditor5/popup/js/image.html5.js @@ -14,7 +14,7 @@ var activeImage = null, dragDropDiv, eventDiff_x = 0, eventDiff_y = 0, - fileTypeRe = /^image\/(png|jpeg|gif)$/i, + fileTypeRe = /^image\/(png|jpeg|gif|webp)$/i, geckoOffsetX_marker = -3, geckoOffsetY_marker = -1, imageCompleted = 0, @@ -434,7 +434,7 @@ function startUpload(list) { function fileFilterError(file) { alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + - "gif, png, jpg 사진 파일만 전송할 수 있습니다."); + "gif, png, jpg, webp 사진 파일만 전송할 수 있습니다."); } function imgComplete(img, imgSize, boxId) { diff --git a/plugin/editor/cheditor5/popup/js/image.html5.m.js b/plugin/editor/cheditor5/popup/js/image.html5.m.js index 67cedbf5d..c70470178 100644 --- a/plugin/editor/cheditor5/popup/js/image.html5.m.js +++ b/plugin/editor/cheditor5/popup/js/image.html5.m.js @@ -14,7 +14,7 @@ var activeImage = null, dragDropDiv, eventDiff_x = 0, eventDiff_y = 0, - fileTypeRe = /^image\/(png|jpeg|gif)$/i, + fileTypeRe = /^image\/(png|jpeg|gif|webp)$/i, geckoOffsetX_marker = -3, geckoOffsetY_marker = -1, imageCompleted = 0, @@ -434,7 +434,7 @@ function startUpload(list) { function fileFilterError(file) { alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + - "gif, png, jpg 사진 파일만 전송할 수 있습니다."); + "gif, png, jpg, webp 사진 파일만 전송할 수 있습니다."); } function imgComplete(img, imgSize, boxId) { diff --git a/plugin/editor/cheditor5/popup/js/image.js b/plugin/editor/cheditor5/popup/js/image.js index 7fc7c642f..706bfb413 100644 --- a/plugin/editor/cheditor5/popup/js/image.js +++ b/plugin/editor/cheditor5/popup/js/image.js @@ -335,7 +335,7 @@ function startUpload(count) { function fileFilterError(file) { alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + - "gif, png, jpg, 그림 파일만 전송할 수 있습니다."); + "gif, png, jpg, webp 그림 파일만 전송할 수 있습니다."); } function imgComplete(img, imgSize, boxId) { diff --git a/plugin/editor/cheditor5/popup/js/image_url.js b/plugin/editor/cheditor5/popup/js/image_url.js index fa5b85d7d..fd53e1582 100644 --- a/plugin/editor/cheditor5/popup/js/image_url.js +++ b/plugin/editor/cheditor5/popup/js/image_url.js @@ -54,7 +54,7 @@ function chkImgFormat (url) { var imageName = getFilename(url); var allowSubmit = false; - var extArray = [".gif", ".jpg", ".jpeg", ".png"]; + var extArray = [".gif", ".jpg", ".jpeg", ".png", ".webp"]; extArray.join(" "); if (imageName === "") { @@ -72,7 +72,7 @@ function chkImgFormat (url) } if (!allowSubmit) { - alert("사진은 GIF, JPG, PNG 형식만 넣을 수 있습니다."); + alert("사진은 GIF, JPG, PNG, WEBP 형식만 넣을 수 있습니다."); return false; }