作者 lyh

gx

... ... @@ -460,7 +460,7 @@ if (!function_exists('getImageUrl')) {
if(is_array($path)){
$url =[];
foreach ($path as $v){
$url[] = getImageUrl($v);
$url[] = getImageUrl($v,$location,$storage_type);
}
}else{
if(empty($path)){
... ... @@ -496,7 +496,7 @@ if (!function_exists('getFileUrl')) {
if(is_array($path)){
$url =[];
foreach ($path as $v){
$url[] = getFileUrl($v);
$url[] = getFileUrl($v,$location,$storage_type);
}
}else{
if(empty($path)){
... ...
... ... @@ -335,7 +335,7 @@ class FileController
$fileModel = new File();
$lists = $fileModel->list($this->map,'id',['id','hash','type','path','created_at','name']);
foreach ($lists as $k => $v){
$v['file_link'] = getFileUrl($v['path']);
$v['file_link'] = getFileUrl($v['path'],$this->cache['project_location'] ?? 1,$this->cache['storage_type'] ?? 0);
$lists[$k] = $v;
}
$this->response('success',Code::SUCCESS,$lists);
... ...
... ... @@ -425,7 +425,7 @@ class ImageController extends Controller
public function responseData($path = '', $name = ''){
$data = [
'image'=>$path,
'image_link'=>getImageUrl($path),
'image_link'=>getImageUrl($path,$this->cache['project_location'] ?? 1,$this->cache['storage_type'] ?? 0),
'name'=>$name,
'image_download'=>url('a/download_images?path='.$path)
];
... ...