...
|
...
|
@@ -105,6 +105,7 @@ class Ajax extends Backend |
|
|
$imagewidth = isset($imgInfo[0]) ? $imgInfo[0] : $imagewidth;
|
|
|
$imageheight = isset($imgInfo[1]) ? $imgInfo[1] : $imageheight;
|
|
|
}
|
|
|
$url = 'http://feipin.w.brotop.cn'.$uploadDir . $splInfo->getSaveName();
|
|
|
$params = array(
|
|
|
'admin_id' => (int)$this->auth->id,
|
|
|
'user_id' => 0,
|
...
|
...
|
@@ -114,7 +115,7 @@ class Ajax extends Backend |
|
|
'imagetype' => $suffix,
|
|
|
'imageframes' => 0,
|
|
|
'mimetype' => $fileInfo['type'],
|
|
|
'url' => $uploadDir . $splInfo->getSaveName(),
|
|
|
'url' => $url,
|
|
|
'uploadtime' => time(),
|
|
|
'storage' => 'local',
|
|
|
'sha1' => $sha1,
|
...
|
...
|
@@ -124,7 +125,7 @@ class Ajax extends Backend |
|
|
$attachment->save();
|
|
|
\think\Hook::listen("upload_after", $attachment);
|
|
|
$this->success(__('Upload successful'), null, [
|
|
|
'url' => $uploadDir . $splInfo->getSaveName()
|
|
|
'url' => $url
|
|
|
]);
|
|
|
} else {
|
|
|
// 上传失败获取错误信息
|
...
|
...
|
|