From 75061d843a6dcb1c0938f7cd9ecd62d96b3c514a Mon Sep 17 00:00:00 2001 From: gaoxiongzaq Date: Tue, 24 Oct 2023 11:27:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E8=8E=B7=E5=8F=96=E9=94=99=E8=AF=AF=20?= =?UTF-8?q?=E4=B8=8D=E8=BE=93=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/keking/service/impl/MediaFilePreviewImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/cn/keking/service/impl/MediaFilePreviewImpl.java b/server/src/main/java/cn/keking/service/impl/MediaFilePreviewImpl.java index caf7b5d3..b5df72ac 100644 --- a/server/src/main/java/cn/keking/service/impl/MediaFilePreviewImpl.java +++ b/server/src/main/java/cn/keking/service/impl/MediaFilePreviewImpl.java @@ -38,7 +38,7 @@ public class MediaFilePreviewImpl implements FilePreview { String cacheName = fileAttribute.getcacheName(); String outFilePath = fileAttribute.getoutFilePath(); boolean forceUpdatedCache=fileAttribute.forceUpdatedCache(); - String type = fileAttribute.getSuffix(); + FileType type = fileAttribute.getType(); String[] mediaTypesConvert = FileType.MEDIA_TYPES_CONVERT; //获取支持的转换格式 boolean mediaTypes = false; for(String temp : mediaTypesConvert){ @@ -59,7 +59,7 @@ public class MediaFilePreviewImpl implements FilePreview { if(mediaTypes){ convertedUrl=convertToMp4(filePath,outFilePath); }else { - convertedUrl =outFilePath; //其他协议的 不需要转换方式的文件 支持输出 + convertedUrl =outFilePath; //其他协议的 不需要转换方式的文件 直接输出 } } catch (Exception e) { e.printStackTrace();