修改上传问题
This commit is contained in:
@@ -101,7 +101,7 @@ public class FileValid {
|
||||
private static String bytesToHex(byte[] bytes) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (byte b : bytes) {
|
||||
sb.append(String.format("%02x", b));
|
||||
sb.append(String.format("%02X", b));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -128,7 +128,9 @@ public class FileValid {
|
||||
case "docx":
|
||||
case "xlsx":
|
||||
case "pptx":
|
||||
return magic.startsWith("504B0304");
|
||||
return magic.startsWith("504B0304")
|
||||
|| magic.startsWith("504B0506")
|
||||
|| magic.startsWith("504B0708");
|
||||
// 视频 mp4/mov/m4v
|
||||
case "mp4":
|
||||
case "mov":
|
||||
|
||||
Reference in New Issue
Block a user