From ad6cc0b816bac080e57a89fcb7f6a7147aa35334 Mon Sep 17 00:00:00 2001 From: icret Date: Tue, 4 Jan 2022 06:40:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=87=B3API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/index.php b/api/index.php index 1c5efa0..03951e2 100755 --- a/api/index.php +++ b/api/index.php @@ -17,7 +17,7 @@ if ($handle->uploaded) { // 允许上传的mime类型 $handle->allowed = array('image/*'); // 文件命名 - $handle->file_new_name_body = imgName() . '_' . getID($token); + $handle->file_new_name_body = imgName($handle->file_src_name_body) . '_' . getID($token); // 最大上传限制 $handle->file_max_sizes = $config['maxSize']; // 最大宽度 @@ -31,12 +31,13 @@ if ($handle->uploaded) { // 转换图片为指定格式 $handle->image_convert = $config['imgConvert']; - //等比例缩减图片 + /* 等比例缩减图片 放到前端了 if ($config['imgRatio']) { $handle->image_resize = true; $handle->image_x = $config['image_x']; $handle->image_y = $config['image_y']; } + */ // 存储图片路径:images/201807/ $handle->process('../' . config_path());