Browse Source

oss对接

黄宗昌 2 years ago
parent
commit
9f04eccc5c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Helper/AttachmentHelper.php

+ 1 - 1
app/Helper/AttachmentHelper.php

xqd
@@ -90,7 +90,7 @@ trait AttachmentHelper
                         $tmppath = $file->getRealPath();
                         //生成文件名
                         $fileName = rand(100, 999) . time() . date('ymd') . '.' . $file->getClientOriginalExtension();
-                        $pathName = 'golf/' . date('Y-m/d') . '/' . $fileName;
+                        $pathName = 'huabook/' . date('Y-m/d') . '/' . $fileName;
                         //上传图片到阿里云OSS
                         $oss = new OssClient(env('ALI_OSS_ACCESS_ID'), env('ALI_OSS_ACCESS_KEY'), env('ALI_OSS_ENDPOINT'));
                         $res = $oss->uploadFile(env('ALI_OSS_BUCKET'), $pathName, $tmppath, ['ContentType' => $file->getClientMimeType()]);