合并分支 'lyh-server' 到 'master'
gx 查看合并请求 !1945
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -226,13 +226,13 @@ class CropImage extends Command | @@ -226,13 +226,13 @@ class CropImage extends Command | ||
| 226 | * @time :2025/5/8 14:59 | 226 | * @time :2025/5/8 14:59 |
| 227 | */ | 227 | */ |
| 228 | public function saveMysql($project_id,$size,$image_type,$path,$mime = ''){ | 228 | public function saveMysql($project_id,$size,$image_type,$path,$mime = ''){ |
| 229 | - $hash = hash_file('sha256', $path); | 229 | + $hash = md5($path); |
| 230 | $imageModel = new Image(); | 230 | $imageModel = new Image(); |
| 231 | $info = $imageModel->read(['hash'=>$hash,'project_id'=>$project_id]); | 231 | $info = $imageModel->read(['hash'=>$hash,'project_id'=>$project_id]); |
| 232 | $data = [ | 232 | $data = [ |
| 233 | 'path' => $path, | 233 | 'path' => $path, |
| 234 | 'size' => $size, | 234 | 'size' => $size, |
| 235 | - 'hash' => hash_file('sha256', $path), | 235 | + 'hash' => $hash, |
| 236 | 'type' => $image_type, | 236 | 'type' => $image_type, |
| 237 | 'refer'=> 0, | 237 | 'refer'=> 0, |
| 238 | 'mime' => $mime, | 238 | 'mime' => $mime, |
-
请 注册 或 登录 后发表评论