Skip to content

Commit

Permalink
fix: 增加文件上传类型,video格式支持
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiGaoRobot committed Jul 19, 2023
1 parent 7b13ae1 commit c73204a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public ResultMessage<Object> upload(MultipartFile file,
}


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);
}

Expand Down

0 comments on commit c73204a

Please sign in to comment.