Commit 61446396 authored by hj's avatar hj

更新提交

parent 93f3033b
......@@ -86,4 +86,24 @@ class MsdsController extends Controller
$this->returnErrorExecptionResponse($exception);
}
}
public function viewImage($path)
{
try{
ob_end_clean();
$image = $this->getService()->loadFile($path);
$fileInfo = $this->getService()->getFileListByUniqueId($path);
if($fileInfo){
$fileInfo = current($fileInfo);
header('content-type:'.$fileInfo['mime_type']);
}else{
header('content-type:image/svg+xml');
}
echo $image;
}catch(\Throwable $exception){
$this->returnErrorExecptionResponse($exception);
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment