兼容写法

pull/201/head
27025011 2020-05-25 14:47:55 +08:00
parent fc9f1a34d2
commit 7c8d0a50ae
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ class Common extends Api
'storage' => 'local',
'sha1' => $sha1,
);
$attachment = model("attachment");
$attachment = $attachment = new \app\common\model\Attachment();
$attachment->data(array_filter($params));
$attachment->save();
\think\Hook::listen("upload_after", $attachment);