From 9e11fa41d38b82ad4e6669760d8f1d152ab1ca0a Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Wed, 20 Aug 2025 15:18:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E5=8F=AA?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E4=B8=AA=E4=BA=BA=E7=9B=B8=E5=90=8C=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/controller/Upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common/controller/Upload.php b/app/common/controller/Upload.php index 11289c7..42262b3 100644 --- a/app/common/controller/Upload.php +++ b/app/common/controller/Upload.php @@ -84,7 +84,7 @@ class Upload extends BaseController $prefix=$filecate.'/'.date('Y-m-d').'/'.$uid."/"; } $name=str_replace('.'.$info['ext'],'',$info['name']); - $file=false;//FileModel::where(['md5'=>$info['md5']])->find(); + $file=FileModel::where(['md5'=>$info['md5'],'user_id'=>$uid])->find(); // 判断文件是否存在,如果有则不再上传 if(!$file){ $newName = uniqid() . '.' . $info['ext']; @@ -327,7 +327,7 @@ class Upload extends BaseController } $prefix='emoji/'.$uid.'/'; $name=str_replace('.'.$info['ext'],'',$info['name']); - $fileInfo=FileModel::where(['md5'=>$info['md5']])->find(); + $fileInfo=FileModel::where(['md5'=>$info['md5'],'user_id'=>$uid])->find(); // 判断文件是否存在,如果有则不再上传 if(!$fileInfo){ $newName = uniqid() . '.' . $info['ext'];