add:加载载具图片页面
This commit is contained in:
@@ -91,6 +91,8 @@ public class BsrealStorattrController {
|
||||
public ResponseEntity<Object> getFile(@PathVariable String filename) {
|
||||
try {
|
||||
String imagePath = HikvisionSnapshotUtil.path+ DateUtil.thisYear();
|
||||
//文件名称后缀是jpg,具体以实际为准。文件路径是:path+当前年份,在存储时也是一样
|
||||
//文件会存储两份:一个是载具编号.jpg,一个是载具编号_任务号.jpg,载具编号的图片会进行替换为最新的
|
||||
Path file = Paths.get(imagePath).resolve(filename+".jpg");
|
||||
org.springframework.core.io.Resource resource = new UrlResource(file.toUri());
|
||||
if (resource.exists() && resource.isReadable()) {
|
||||
|
||||
Reference in New Issue
Block a user