From a1a695a033b5c424af3ee690cd69d8208aac33e1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 24 Nov 2025 20:53:51 +0800 Subject: [PATCH] fix:【framework】附件返回时,iOS 手机可播放 --- yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java b/yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java index 28d6a9f..f8cd1c4 100644 --- a/yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java +++ b/yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java @@ -91,9 +91,8 @@ public class FileTypeUtils { } // 针对 video 的特殊处理,解决视频地址在移动端播放的兼容性问题 if (StrUtil.containsIgnoreCase(mineType, "video")) { - response.setHeader("Content-Length", String.valueOf(content.length)); - response.setHeader("Content-Range", "bytes 0-" + (content.length - 1) + "/" + content.length); response.setHeader("Accept-Ranges", "bytes"); + response.setHeader("Content-Length", String.valueOf(content.length)); } // 输出附件 IoUtil.write(response.getOutputStream(), false, content); -- libgit2 0.21.4