From 8e446d19e97e4648df477c7121aa5cd380a11683 Mon Sep 17 00:00:00 2001 From: tangwenkang <2720983602@qq.com> Date: Mon, 6 Nov 2023 20:38:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=B8=8A=E4=BC=A0=E5=88=B0?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E4=BA=91=E5=AD=98=E5=82=A8=E7=9A=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../health/video/server/service/impl/VideoServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/health-video-server/src/main/java/com/health/video/server/service/impl/VideoServiceImpl.java b/health-video-server/src/main/java/com/health/video/server/service/impl/VideoServiceImpl.java index 0d075d9..f0d2f40 100644 --- a/health-video-server/src/main/java/com/health/video/server/service/impl/VideoServiceImpl.java +++ b/health-video-server/src/main/java/com/health/video/server/service/impl/VideoServiceImpl.java @@ -216,7 +216,7 @@ public class VideoServiceImpl implements VideoService { String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")).toLowerCase(); String fileName = result + fileExt; vodConfig.put("filename",fileName); // 此参数不重要,只要能保留文件后缀名如 a.mp4 即可 - vodConfig.put("vn", result); // .. . 分组配置、回调参数 + vodConfig.put("vn", fileName); // .. . 分组配置、回调参数 JSONObject body = new JSONObject();// 构建body对象 body.put("channel", "VOD_UPLOAD"); body.put("vodConfig", vodConfig); @@ -253,7 +253,7 @@ public class VideoServiceImpl implements VideoService { File localFile = new File(filePath); // 计算文件的 SHA-256 哈希值(比MD5加密更安全) String fileMD5 = calculateFileSHA256(localFile); - System.out.println("SHA-256加密内容为:{}"+fileMD5); + System.out.println("SHA-256加密内容为:"+fileMD5); // 检查目录是否存在,如果不存在则创建 File localDirectory = localFile.getParentFile(); if (!localDirectory.exists()) {