Commit 588e92a8 authored by shajiaiming's avatar shajiaiming

修复已知问题

parent dd1cd4d3
...@@ -23,7 +23,7 @@ class OssController extends BaseController ...@@ -23,7 +23,7 @@ class OssController extends BaseController
$object = md5(date('Y-m-d H:i:s') . $uploaded_file->tempName) . '.' . $uploaded_file->extension; $object = md5(date('Y-m-d H:i:s') . $uploaded_file->tempName) . '.' . $uploaded_file->extension;
$filePath = $uploaded_file->tempName; $filePath = $uploaded_file->tempName;
$ossClient = new OssClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint); $ossClient = new OssClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint);
$result = $ossClient->uploadFile($this->bucket, (empty($type) ? '' : $type . '/') . $object, $filePath); $result = $ossClient->uploadFile($this->bucket, 'upload/' . (empty($type) ? '' : $type . '/') . $object, $filePath);
if (!isset($result["info"]['url'])) { if (!isset($result["info"]['url'])) {
return ['code' => 1, 'msg' => '上传失败']; return ['code' => 1, 'msg' => '上传失败'];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment