|
|
@@ -73,13 +73,20 @@ abstract class Server
|
|
|
$quality = ConfigService::get('upload', 'image_quality', 80);
|
|
|
$maxWidth = ConfigService::get('upload', 'max_width', 1920);
|
|
|
$maxHeight = ConfigService::get('upload', 'max_height', 1080);
|
|
|
-
|
|
|
- return ImageCompressService::compress(
|
|
|
+ // 添加调试信息
|
|
|
+ error_log('开始压缩图片: ' . $this->fileInfo['realPath']);
|
|
|
+ $result = ImageCompressService::compress(
|
|
|
$this->fileInfo['realPath'],
|
|
|
$quality,
|
|
|
$maxWidth,
|
|
|
$maxHeight
|
|
|
);
|
|
|
+ if ($result === false) {
|
|
|
+ error_log('图片压缩失败: ' . $this->fileInfo['realPath']);
|
|
|
+ } else {
|
|
|
+ error_log('图片压缩成功: ' . $result);
|
|
|
+ }
|
|
|
+ return $result;
|
|
|
}
|
|
|
|
|
|
/**
|