fix: webp가 업로드 가능하나, 메시지 표기가 누락된 버그 수정

This commit is contained in:
2021-12-08 01:38:23 +09:00
parent d4d8e0045b
commit 4623cfbe06
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ if(!is_uploaded_file($image['tmp_name'])) {
$response['result'] = false; $response['result'] = false;
} elseif(!$newExt) { } elseif(!$newExt) {
//확장자 검사 //확장자 검사
$response['reason'] = 'jpg, gif, png 파일이 아닙니다!'; $response['reason'] = 'webp, jpg, gif, png 파일이 아닙니다!';
$response['result'] = false; $response['result'] = false;
} elseif($image['size'] > 30720) { } elseif($image['size'] > 30720) {
//파일크기 검사 //파일크기 검사
+1 -1
View File
@@ -90,7 +90,7 @@ if($action == 'scrub_icon'){
$cnt = 0; $cnt = 0;
foreach(glob(AppConf::getUserIconPathFS().'/*.{jpg,png,gif}', GLOB_BRACE) as $filepath){ foreach(glob(AppConf::getUserIconPathFS().'/*.{webp,jpg,png,gif}', GLOB_BRACE) as $filepath){
$filename = basename($filepath); $filename = basename($filepath);
if (array_key_exists($filename, $usedIcon)) { if (array_key_exists($filename, $usedIcon)) {
+1 -1
View File
@@ -138,7 +138,7 @@ require(__DIR__.'/../vendor/autoload.php');
<form name="change_icon_form" id="change_icon_form" method="post" enctype="multipart/form-data"> <form name="change_icon_form" id="change_icon_form" method="post" enctype="multipart/form-data">
<input class="with_skin" type="text" readonly="readonly" id="image_upload_filename"> <input class="with_skin" type="text" readonly="readonly" id="image_upload_filename">
<button id="image_upload_fake_btn" class="with_skin">찾아보기</button> <button id="image_upload_fake_btn" class="with_skin">찾아보기</button>
<input type="file" id="image_upload" name="image_upload" accept=".jpg,.jpeg,.png,.gif"><br> <input type="file" id="image_upload" name="image_upload" accept=".webp,.jpg,.jpeg,.png,.gif"><br>
<input class="with_skin" id="btn_image_submit" type="submit" value="아이콘 변경"> <button id="btn_remove_icon" class="with_skin">아이콘 제거</button> <input class="with_skin" id="btn_image_submit" type="submit" value="아이콘 변경"> <button id="btn_remove_icon" class="with_skin">아이콘 제거</button>
</form> </form>