@@ -22,6 +22,7 @@ public enum ResultCode {
MODEL_NOT_EXIST(7014,"模型不存在"),
SCENE_NOT_EXIST(7015,"当前场景已被删除"),
UPLOAD_FILE_CHINA_NAME(7016,"文件名不能包含中文"),
+ UPLOAD_FILE_NAME_TO_LONG(7017,"文件名超过长度限制"),
HOT_ICON_NOT_EXIST(7004,"热点icon不存在");
@@ -77,6 +77,9 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
if(com.fdkankan.fusion.common.util.StringUtils.isChinese(fileName)){
throw new BusinessException(ResultCode.UPLOAD_FILE_CHINA_NAME);
}
+ if(fileName.length() >50){
+ throw new BusinessException(ResultCode.UPLOAD_FILE_NAME_TO_LONG);
+ }
if(!fileName.toLowerCase().endsWith(".zip")){
throw new BusinessException(ResultCode.UPLOAD_FILE_TYPE_ERROR);