Commit e43a6151 authored by chentianyu's avatar chentianyu

oss修正使用例子

parent a762b17a
...@@ -71,11 +71,11 @@ class UploadExample extends AbstractController ...@@ -71,11 +71,11 @@ class UploadExample extends AbstractController
*/ */
public function file() public function file()
{ {
$image = $this->request->file('file'); $file = $this->request->file('file');
$userId = Auth::id()??0; $userId = Auth::id()??0;
$module = OssEnum::PRODUCT_CHILD; $module = OssEnum::PRODUCT_CHILD;
if (!$file) { if (!$file) {
throw new HttpResponseException('请上传图片'); throw new HttpResponseException('请上传文件');
} }
/** /**
* UploadedFile $file * UploadedFile $file
......
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