同步至API

pull/18/head
icret 2022-01-04 06:40:47 +08:00
parent 811374700d
commit ad6cc0b816
1 changed files with 3 additions and 2 deletions

View File

@ -17,7 +17,7 @@ if ($handle->uploaded) {
// 允许上传的mime类型 // 允许上传的mime类型
$handle->allowed = array('image/*'); $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']; $handle->file_max_sizes = $config['maxSize'];
// 最大宽度 // 最大宽度
@ -31,12 +31,13 @@ if ($handle->uploaded) {
// 转换图片为指定格式 // 转换图片为指定格式
$handle->image_convert = $config['imgConvert']; $handle->image_convert = $config['imgConvert'];
//等比例缩减图片 /* 等比例缩减图片 放到前端了
if ($config['imgRatio']) { if ($config['imgRatio']) {
$handle->image_resize = true; $handle->image_resize = true;
$handle->image_x = $config['image_x']; $handle->image_x = $config['image_x'];
$handle->image_y = $config['image_y']; $handle->image_y = $config['image_y'];
} }
*/
// 存储图片路径:images/201807/ // 存储图片路径:images/201807/
$handle->process('../' . config_path()); $handle->process('../' . config_path());