|
...
|
...
|
@@ -291,7 +291,8 @@ class ImageController extends Controller |
|
|
|
*/
|
|
|
|
public function download(){
|
|
|
|
$imageModel = new ImageModel();
|
|
|
|
$info = $imageModel->read(['path' => $this->param['path']]);
|
|
|
|
;
|
|
|
|
$info = $imageModel->read(['path' => '/'.str_replace_url($this->param['path'])]);
|
|
|
|
if ($info === false) {
|
|
|
|
$this->response('指定文件不存在!', Code::USER_ERROR);
|
|
|
|
}
|
|
...
|
...
|
@@ -395,20 +396,4 @@ class ImageController extends Controller |
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取下载链接
|
|
|
|
* @name :getDownloadUrl
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/26 14:00
|
|
|
|
*/
|
|
|
|
public function getDownloadUrl(){
|
|
|
|
$imageModel = new ImageModel();
|
|
|
|
$info = $imageModel->read(['path' => $this->param['path']]);
|
|
|
|
if ($info === false) {
|
|
|
|
$this->response('指定文件不存在!', Code::USER_ERROR);
|
|
|
|
}
|
|
|
|
$data = ['image_download'=>url('a/downLoad/images?path='.$this->param['path'])];
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|