作者 lyh

gx

... ... @@ -153,7 +153,7 @@ class FileController
'path' => $url.$fileName,
'created_at' => date('Y-m-d H:i:s',time()),
'size' => $res->getSize(),
'hash' => $hash,
'hash' => $hash.$files->getClientOriginalExtension(),,
'type'=>$files->getClientOriginalExtension(),
];
$rs = $fileModel->add($data);
... ... @@ -191,7 +191,7 @@ class FileController
'path' => $url.$fileName,
'created_at' => date('Y-m-d H:i:s',time()),
'size' => $res->getSize(),
'hash' => $hash,
'hash' => $hash.$files->getClientOriginalExtension(),,
'type'=>$files->getClientOriginalExtension(),
];
$data[] = $hash;
... ...
... ... @@ -139,7 +139,7 @@ class ImageController
'path' => $url.$fileName,
'created_at' => date('Y-m-d H:i:s',time()),
'size' => $res->getSize(),
'hash' => $hash,
'hash' => $hash.$files->getClientOriginalExtension(),
'type'=>$files->getClientOriginalExtension(),
];
$rs = $imageModel->add($data);
... ... @@ -193,7 +193,7 @@ class ImageController
'created_at' => date('Y-m-d H:i:s',time()),
'updated_at'=>date('Y-m-d H:i:s',time()),
'size' => $res->getSize(),
'hash' => $hash,
'hash' => $hash.$files->getClientOriginalExtension(),
'type'=>$file->getClientOriginalExtension(),
];
$data[] = $hash;
... ...
... ... @@ -63,10 +63,10 @@ class AyrReleaseLogic extends BaseLogic
$imageModel = new Image();
$list = $imageModel->list(['hash'=>['in',$images]],'id');
foreach ($list as $v1){
$arr[] = url('/b/image/' . $v1['hash'].'/'.$v1['type']);
$arr[] = url('/b/images/' . $v1['hash']);
}
}else{
$arr[] = url('/b/file_hash/' . $v.'/mp4');
$arr[] = url('/b/file_hash/' . $v);
}
}
return $this->success($arr);
... ...