From 52f7140be13a29272a8816b9f6ca524e6ee42197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Sat, 18 Feb 2023 18:16:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=8F=90=E7=A4=BA=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/upload/storage/Cos.php | 8 ++++---- crmeb/crmeb/services/upload/storage/Local.php | 8 ++++---- crmeb/crmeb/services/upload/storage/Oss.php | 8 ++++---- crmeb/crmeb/services/upload/storage/Qiniu.php | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/crmeb/crmeb/services/upload/storage/Cos.php b/crmeb/crmeb/services/upload/storage/Cos.php index 7dad105b3..4fb29c52a 100644 --- a/crmeb/crmeb/services/upload/storage/Cos.php +++ b/crmeb/crmeb/services/upload/storage/Cos.php @@ -126,17 +126,17 @@ class Cos extends BaseUpload if (!$isStream) { $fileHandle = app()->request->file($file); if (!$fileHandle) { - return $this->setError('Upload file does not exist'); + return $this->setError('上传的文件不存在'); } if ($this->validate) { if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { - return $this->setError('Upload fileExt error'); + return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { - return $this->setError('Upload filesize error'); + return $this->setError('文件过大'); } if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) { - return $this->setError('Upload fileMine error'); + return $this->setError('不合法的文件类型'); } } $key = $this->saveFileName($fileHandle->getRealPath(), $fileHandle->getOriginalExtension()); diff --git a/crmeb/crmeb/services/upload/storage/Local.php b/crmeb/crmeb/services/upload/storage/Local.php index 77260195e..460fc1939 100644 --- a/crmeb/crmeb/services/upload/storage/Local.php +++ b/crmeb/crmeb/services/upload/storage/Local.php @@ -113,17 +113,17 @@ class Local extends BaseUpload { $fileHandle = app()->request->file($file); if (!$fileHandle) { - return $this->setError('Upload file does not exist'); + return $this->setError('上传的文件不存在'); } if ($this->validate) { if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { - return $this->setError('Upload fileExt error'); + return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { - return $this->setError('Upload filesize error'); + return $this->setError('文件过大'); } if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) { - return $this->setError('Upload fileMine error'); + return $this->setError('不合法的文件类型'); } } if ($realName) { diff --git a/crmeb/crmeb/services/upload/storage/Oss.php b/crmeb/crmeb/services/upload/storage/Oss.php index 9f2db973d..d52125ff2 100644 --- a/crmeb/crmeb/services/upload/storage/Oss.php +++ b/crmeb/crmeb/services/upload/storage/Oss.php @@ -121,17 +121,17 @@ class Oss extends BaseUpload { $fileHandle = app()->request->file($file); if (!$fileHandle) { - return $this->setError('Upload file does not exist'); + return $this->setError('上传的文件不存在'); } if ($this->validate) { if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { - return $this->setError('Upload fileExt error'); + return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { - return $this->setError('Upload filesize error'); + return $this->setError('文件过大'); } if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) { - return $this->setError('Upload fileMine error'); + return $this->setError('不合法的文件类型'); } } $key = $this->saveFileName($fileHandle->getRealPath(), $fileHandle->getOriginalExtension()); diff --git a/crmeb/crmeb/services/upload/storage/Qiniu.php b/crmeb/crmeb/services/upload/storage/Qiniu.php index 8b1bc59a9..400b9e489 100644 --- a/crmeb/crmeb/services/upload/storage/Qiniu.php +++ b/crmeb/crmeb/services/upload/storage/Qiniu.php @@ -117,17 +117,17 @@ class Qiniu extends BaseUpload { $fileHandle = app()->request->file($file); if (!$fileHandle) { - return $this->setError('Upload file does not exist'); + return $this->setError('上传的文件不存在'); } if ($this->validate) { if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { - return $this->setError('Upload fileExt error'); + return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { - return $this->setError('Upload filesize error'); + return $this->setError('文件过大'); } if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) { - return $this->setError('Upload fileMine error'); + return $this->setError('不合法的文件类型'); } } $key = $this->saveFileName($fileHandle->getRealPath(), $fileHandle->getOriginalExtension());