@@ -21,6 +21,7 @@ public enum ResultCode {
MERGER_VIDEO_ERROR(7013,"合成视频失败"),
MODEL_NOT_EXIST(7014,"模型不存在"),
SCENE_NOT_EXIST(7015,"当前场景已被删除"),
+ UPLOAD_FILE_CHINA_NAME(7016,"文件名不能包含中文"),
HOT_ICON_NOT_EXIST(7004,"热点icon不存在");
@@ -79,6 +79,9 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
if(StringUtils.isEmpty(fileName)){
throw new BusinessException(ResultCode.UPLOAD_FILE_NO_EXIST);
}
+ if(com.fdkankan.fusion.common.util.StringUtils.isChinese(fileName)){
+ throw new BusinessException(ResultCode.UPLOAD_FILE_TYPE_ERROR);
+ }
if(!fileName.toLowerCase().contains("zip") && !fileName.toLowerCase().contains("rar")){
throw new BusinessException(ResultCode.UPLOAD_FILE_TYPE_ERROR);