未验证 提交 267b3076 编写于 作者: E exmy 提交者: GitHub

[improve][api] Support to upload file without file type suffix (#9553)

上级 36f01155
......@@ -525,7 +525,7 @@ public class ResourcesServiceImpl extends BaseServiceImpl implements ResourcesSe
String nameSuffix = Files.getFileExtension(name);
// determine file suffix
if (!(StringUtils.isNotEmpty(fileSuffix) && fileSuffix.equalsIgnoreCase(nameSuffix))) {
if (!fileSuffix.equalsIgnoreCase(nameSuffix)) {
// rename file suffix and original suffix must be consistent
logger.error("rename file suffix and original suffix must be consistent: {}", RegexUtils.escapeNRT(file.getOriginalFilename()));
putMsg(result, Status.RESOURCE_SUFFIX_FORBID_CHANGE);
......@@ -629,7 +629,7 @@ public class ResourcesServiceImpl extends BaseServiceImpl implements ResourcesSe
String nameSuffix = Files.getFileExtension(fullName);
// determine file suffix
if (!(StringUtils.isNotEmpty(fileSuffix) && fileSuffix.equalsIgnoreCase(nameSuffix))) {
if (!fileSuffix.equalsIgnoreCase(nameSuffix)) {
return false;
}
// query tenant
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册