!297 fix & improve

Merge pull request !297 from OceansDeep/pg
This commit is contained in:
OceansDeep
2023-07-19 03:11:19 +00:00
committed by Gitee

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