From 6a939480c92e77a241b17d81befe1a60125fd8b6 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 21 Jul 2014 18:09:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8A=A4=EB=A7=88=ED=8A=B8=20=EC=97=90?= =?UTF-8?q?=EB=94=94=ED=84=B0=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=97=85?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EC=9C=A0=ED=9A=A8=EC=84=B1=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EB=A1=9C=EB=B9=88=EC=95=84=EB=B9=A0=EB=8B=98?= =?UTF-8?q?=EC=9D=B4=20=EC=95=8C=EB=A0=A4=EC=A3=BC=EC=8B=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js | 2 +- .../smarteditor2/photo_uploader/popup/php/UploadHandler.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js b/plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js index 07261305c..2de8dfc56 100644 --- a/plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js +++ b/plugin/editor/smarteditor2/photo_uploader/popup/js/basic.js @@ -152,7 +152,7 @@ jQuery(function ($) { _done : function(e, data){ var othis = this; $.each(data.result.files, function (index, file) { - if (file.url) { + if (file.url && !file.error) { var ret = othis.get_ratio( file.width, file.height ), node = $(data.context.children()[index]), size_text = file.width+" x "+file.height, diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php index 40bb7422f..33ff9a8b3 100644 --- a/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php +++ b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php @@ -1086,6 +1086,9 @@ class UploadHandler $image_width_height = $this->get_image_size($file_path); $file->width = $image_width_height[0]; $file->height = $image_width_height[1]; + } else { //로빈아빠님이 알려주심, 이미지 업로드 체크 + unlink($file_path); + $file->error = $this->get_error_message('accept_file_types'); } } else { $file->size = $file_size;