|
@@ -396,4 +396,20 @@ class ImageController extends Controller |
|
@@ -396,4 +396,20 @@ class ImageController extends Controller |
|
396
|
return $data;
|
396
|
return $data;
|
|
397
|
}
|
397
|
}
|
|
398
|
|
398
|
|
|
|
|
399
|
+ /**
|
|
|
|
400
|
+ * @remark :获取下载链接
|
|
|
|
401
|
+ * @name :getDownloadUrl
|
|
|
|
402
|
+ * @author :lyh
|
|
|
|
403
|
+ * @method :post
|
|
|
|
404
|
+ * @time :2023/7/26 14:00
|
|
|
|
405
|
+ */
|
|
|
|
406
|
+ public function getDownloadUrl(){
|
|
|
|
407
|
+ $imageModel = new ImageModel();
|
|
|
|
408
|
+ $info = $imageModel->read(['path' => str_replace_url($this->param['path'])]);
|
|
|
|
409
|
+ if ($info === false) {
|
|
|
|
410
|
+ $this->response('指定文件不存在!', Code::USER_ERROR);
|
|
|
|
411
|
+ }
|
|
|
|
412
|
+ $data = ['image_download'=>url('a/downLoad/images?path='.$info['path'])];
|
|
|
|
413
|
+ $this->response('success',Code::SUCCESS,$data);
|
|
|
|
414
|
+ }
|
|
399
|
} |
415
|
} |