...
|
...
|
@@ -538,8 +538,11 @@ class Almighty extends Api |
|
|
$this->error("上传失败");
|
|
|
}
|
|
|
// 返回文件地址
|
|
|
$cdnurl = $this->file_exists('/' . $filename . '.pcm');
|
|
|
return $cdnurl;
|
|
|
$url = '/' . $filename . '.pcm';
|
|
|
if($this->file_exists($url)){
|
|
|
return cdnurl($url);
|
|
|
}
|
|
|
$this->error('接口错误');
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -550,11 +553,9 @@ class Almighty extends Api |
|
|
{
|
|
|
$info = Db::name('attachment')->where('url',$url)->field('id')->find();
|
|
|
if(!$info){
|
|
|
$i = 1;
|
|
|
Db::name('ceshi')->insert(['content'=>$i++]);
|
|
|
$this->file_exists($url);
|
|
|
}else{
|
|
|
return cdnurl($url);
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|