优化海康发送的Message消息设置的消息体长度为0,导致无法解析的问题 #920

This commit is contained in:
648540858
2023-07-07 14:51:41 +08:00
parent 9fc9a29811
commit ff1e9f79c2
6 changed files with 487 additions and 9 deletions

View File

@@ -470,7 +470,6 @@ public class DeviceQuery {
public void getSnap(HttpServletResponse resp, @PathVariable String deviceId, @PathVariable String channelId, @RequestParam(required = false) String mark) {
try {
final InputStream in = Files.newInputStream(new File("snap" + File.separator + deviceId + "_" + channelId + (mark == null? ".jpg": ("_" + mark + ".jpg"))).toPath());
resp.setContentType(MediaType.IMAGE_PNG_VALUE);
IOUtils.copy(in, resp.getOutputStream());