|
|
|
@ -84,7 +84,7 @@ class Upload extends BaseController |
|
|
|
$prefix=$filecate.'/'.date('Y-m-d').'/'.$uid."/"; |
|
|
|
} |
|
|
|
$name=str_replace('.'.$info['ext'],'',$info['name']); |
|
|
|
$file=FileModel::where(['md5'=>$info['md5']])->find(); |
|
|
|
$file=false;//FileModel::where(['md5'=>$info['md5']])->find(); |
|
|
|
// 判断文件是否存在,如果有则不再上传 |
|
|
|
if(!$file){ |
|
|
|
$newName = uniqid() . '.' . $info['ext']; |
|
|
|
@ -447,6 +447,9 @@ class Upload extends BaseController |
|
|
|
|
|
|
|
// 原图地址 |
|
|
|
$filePath = root_path().'public' . $src; |
|
|
|
if (!file_exists($filePath)) { |
|
|
|
return ''; |
|
|
|
} |
|
|
|
// 处理图地址 |
|
|
|
$target = root_path().'public/' .ltrim($compress_path,'/'); |
|
|
|
// 图片模糊处理 |
|
|
|
|