Commit 8fb6b447 by 杨树贤

修复OSS上传问题

parent f3c6b6cd
......@@ -104,8 +104,7 @@ class ApiController extends Controller
$filePath = storage_path() . '/app/uploads/' . $filename;
$result = json_decode(UploadToOss($filePath), true);
Storage::disk('uploads')->delete($filename);
if (!empty($result['code']) && $result['code'] == 200 && !empty($result['data'][0])) {
if (isset($result['errcode']) && $result['errcode'] == 0 && !empty($result['data'][0])) {
$this->Export(0,'上传成功',$result['data'][0]);
}else return [10003, '上传失败'];
......
......@@ -30,6 +30,6 @@ return [
10000
),
'UploadUrl'=>'http://api.ichunt.com/oss/upload',//上传图片接口地址
'UploadUrl'=>'http://api.liechuan.com/oss/upload',//上传图片接口地址
'UploadKey'=>'fh6y5t4rr351d2c3bryi',
];
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 sign in to comment