Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用FileTypeUtil判断wav后缀的录音文件类型,没有匹配到 #2821

Closed
yanjingfan opened this issue Dec 21, 2022 · 2 comments · Fixed by #2834
Closed

使用FileTypeUtil判断wav后缀的录音文件类型,没有匹配到 #2821

yanjingfan opened this issue Dec 21, 2022 · 2 comments · Fixed by #2834
Assignees
Labels

Comments

@yanjingfan
Copy link

版本情况

JDK版本: jdk8
hutool版本: 5.3.10

问题描述(包括截图)

image

经过测试,不同的wav文件,文件流头部16进制字符串格式为

52494646xxxxxxxx57415645666D74201200000006000100401F0000

中间的8个x都不同,下面FileTypeUtil类中fileTypeMap这么写,应该是不对的

fileTypeMap.put("52494646e27807005741", "wav"); // Wave (wav)
  1. 测试涉及到的文件,下面的测试文件下载有效期:2022:12:18 16:11:53
    http://120.24.173.36:9000/sinvie/sinvie-steward/server/2022/1215/20221221145616271.wav
@CherryRum
Copy link
Collaborator

嗯确实有问题,第5-8为File size

@CherryRum CherryRum self-assigned this Dec 26, 2022
@CherryRum CherryRum added the bug label Dec 26, 2022
@CherryRum
Copy link
Collaborator

2023年前优化下这个类

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants