fix: 增加文件上传类型,video格式支持

This commit is contained in:
misworga831 2023-07-19 11:10:19 +08:00
parent 7b13ae13ad
commit c73204a828

View File

@ -75,7 +75,7 @@ public class UploadController {
}
if (!CharSequenceUtil.containsAny(file.getContentType().toLowerCase(), "image")) {
if (!CharSequenceUtil.containsAny(Objects.requireNonNull(file.getContentType()).toLowerCase(), "image", "video")) {
throw new ServiceException(ResultCode.FILE_TYPE_NOT_SUPPORT);
}