作者 Karson

优化API接口上传配置

@@ -47,7 +47,7 @@ class Common extends Api @@ -47,7 +47,7 @@ class Common extends Api
47 } 47 }
48 48
49 $upload['cdnurl'] = $upload['cdnurl'] ? $upload['cdnurl'] : cdnurl('', true); 49 $upload['cdnurl'] = $upload['cdnurl'] ? $upload['cdnurl'] : cdnurl('', true);
50 - $upload['uploadurl'] = preg_match("/^((?:[a-z]+:)?\/\/)(.*)/i", $upload['uploadurl']) ? $upload['uploadurl'] : url($upload['bucket'] == 'local' ? '/api/common/upload' : $upload['uploadurl'], '', false, true); 50 + $upload['uploadurl'] = preg_match("/^((?:[a-z]+:)?\/\/)(.*)/i", $upload['uploadurl']) ? $upload['uploadurl'] : url($upload['storage'] == 'local' ? '/api/common/upload' : $upload['uploadurl'], '', false, true);
51 51
52 $content = [ 52 $content = [
53 'citydata' => Area::getCityFromLngLat($lng, $lat), 53 'citydata' => Area::getCityFromLngLat($lng, $lat),