未验证 提交 e5eb0e6e 编写于 作者: W wolfcode 提交者: GitHub

Update UploadService.php

上级 fad86132
...@@ -70,7 +70,7 @@ class UploadService ...@@ -70,7 +70,7 @@ class UploadService
$endpoint = $config['oss_endpoint']; $endpoint = $config['oss_endpoint'];
$bucket = $config['oss_bucket']; $bucket = $config['oss_bucket'];
if ($file->isValid()) { if ($file->isValid()) {
$object = $this->setFilePath($file, 'blog -static/'); $object = $this->setFilePath($file, 'blog-static/');
try { try {
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);
$_rs = $ossClient->putObject($bucket, $object, file_get_contents($file->getRealPath())); $_rs = $ossClient->putObject($bucket, $object, file_get_contents($file->getRealPath()));
...@@ -150,4 +150,4 @@ class UploadService ...@@ -150,4 +150,4 @@ class UploadService
return ['code' => 0, 'data' => $data]; return ['code' => 0, 'data' => $data];
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册