Commit a1a695a033b5c424af3ee690cd69d8208aac33e1
1 parent
d1b8e03b
fix:【framework】附件返回时,iOS 手机可播放
Showing
1 changed file
with
1 additions
and
2 deletions
yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/framework/file/core/utils/FileTypeUtils.java
| @@ -91,9 +91,8 @@ public class FileTypeUtils { | @@ -91,9 +91,8 @@ public class FileTypeUtils { | ||
| 91 | } | 91 | } |
| 92 | // 针对 video 的特殊处理,解决视频地址在移动端播放的兼容性问题 | 92 | // 针对 video 的特殊处理,解决视频地址在移动端播放的兼容性问题 |
| 93 | if (StrUtil.containsIgnoreCase(mineType, "video")) { | 93 | if (StrUtil.containsIgnoreCase(mineType, "video")) { |
| 94 | - response.setHeader("Content-Length", String.valueOf(content.length)); | ||
| 95 | - response.setHeader("Content-Range", "bytes 0-" + (content.length - 1) + "/" + content.length); | ||
| 96 | response.setHeader("Accept-Ranges", "bytes"); | 94 | response.setHeader("Accept-Ranges", "bytes"); |
| 95 | + response.setHeader("Content-Length", String.valueOf(content.length)); | ||
| 97 | } | 96 | } |
| 98 | // 输出附件 | 97 | // 输出附件 |
| 99 | IoUtil.write(response.getOutputStream(), false, content); | 98 | IoUtil.write(response.getOutputStream(), false, content); |