From adee8accbef347f9d6bc5832a25f06e427ac136d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=80=E6=BA=90=E7=A4=BE=E5=8C=BA=E9=87=91=E4=B8=89?= =?UTF-8?q?=E6=9C=88=E5=8D=8A?= Date: Wed, 12 Apr 2023 04:08:33 +0000 Subject: [PATCH] =?UTF-8?q?update=20app/common/library/Upload.php.=20273?= =?UTF-8?q?=E8=A1=8C=E4=BB=A3=E7=A0=81=20=E8=B0=83=E6=95=B4=E4=B8=BA$this-?= =?UTF-8?q?>resource=20=3D=20public=5Fpath().$this->filepath=20.=20DS=20.?= =?UTF-8?q?=20sha1($params['chunkId'])=20.=20'.'=20.=20$fileExt;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 不然大文件上传之后会跑到具体的磁盘目录下。 Signed-off-by: user_5037913 --- app/common/library/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/library/Upload.php b/app/common/library/Upload.php index 1d2a4292..dff7cc1e 100644 --- a/app/common/library/Upload.php +++ b/app/common/library/Upload.php @@ -278,7 +278,7 @@ class Upload try { $this->getFileSavePath($file); // 分片上传使用ID作为文件名 - $this->resource = $this->filepath . DS . sha1($params['chunkId']) . '.' . $fileExt; + $this->resource = public_path().$this->filepath . DS . sha1($params['chunkId']) . '.' . $fileExt; $file->move($this->resource); } catch (\Exception $e) { Event::emit('uploadExceptionDelete', [ -- Gitee