diff --git a/app/common/service/UploadService.php b/app/common/service/UploadService.php index 65a31a3..ca864fa 100644 --- a/app/common/service/UploadService.php +++ b/app/common/service/UploadService.php @@ -41,7 +41,7 @@ class UploadService // 上传文件 $uriPath = '/'.$saveDir . '/' . date('Ymd'); - $saveDir = public_path().$uriPath; + $saveDir = 'public'.$uriPath; if (!$StorageDriver->upload($saveDir)) { throw new Exception($StorageDriver->getError()); } @@ -110,7 +110,8 @@ class UploadService } // 上传文件 - $saveDir = $saveDir . '/' . date('Ymd'); + $uriPath = '/'.$saveDir . '/' . date('Ymd'); + $saveDir = 'public'.$uriPath; if (!$StorageDriver->upload($saveDir)) { throw new Exception($StorageDriver->getError()); }