webp 이미지를 업로드 할 수 있도록 수정 중
This commit is contained in:
@ -197,7 +197,8 @@ for ($i=1; $i<=$upload_count; $i++) {
|
||||
// image type
|
||||
if ( preg_match("/\.({$config['cf_image_extension']})$/i", $filename) ||
|
||||
preg_match("/\.({$config['cf_flash_extension']})$/i", $filename) ) {
|
||||
if ($timg['2'] < 1 || $timg['2'] > 16)
|
||||
// webp 파일의 type 이 18 이므로 업로드가 가능하도록 수정
|
||||
if ($timg['2'] < 1 || $timg['2'] > 18)
|
||||
continue;
|
||||
}
|
||||
//=================================================================
|
||||
|
||||
@ -12,7 +12,7 @@ if(function_exists('clean_relative_paths')){
|
||||
|
||||
$extension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||
|
||||
if ( ! preg_match('/(jpg|jpeg|png|gif|bmp)$/i', $extension) ){
|
||||
if ( ! preg_match('/(jpg|jpeg|png|gif|bmp|webp)$/i', $extension) ){
|
||||
alert_close('이미지 확장자가 아닙니다.');
|
||||
}
|
||||
|
||||
|
||||
@ -532,7 +532,7 @@ if(isset($_FILES['bf_file']['name']) && is_array($_FILES['bf_file']['name'])) {
|
||||
// image type
|
||||
if ( preg_match("/\.({$config['cf_image_extension']})$/i", $filename) ||
|
||||
preg_match("/\.({$config['cf_flash_extension']})$/i", $filename) ) {
|
||||
if ($timg['2'] < 1 || $timg['2'] > 16)
|
||||
if ($timg['2'] < 1 || $timg['2'] > 18)
|
||||
continue;
|
||||
}
|
||||
//=================================================================
|
||||
|
||||
Reference in New Issue
Block a user