59392 上传文件的文件名称校验,最多70位。
This commit is contained in:
+11
@@ -170,6 +170,13 @@ public class CommonController {
|
||||
// bizPath = "";
|
||||
// }
|
||||
}
|
||||
if(file.getOriginalFilename().length()>70){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("文件名长度不能超过70位,请检查!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("File name length cannot exceed 70 characters, please check!");
|
||||
}
|
||||
}
|
||||
// OSSFile oSSFile = ossFileService.uploadLocal(file, bizPath,state,cut);
|
||||
OSSFile oSSFile = ossFileService.uploadLocalOfCos(file, bizPath,state,cut); // 切换cos
|
||||
if (oConvertUtils.isNotEmpty(oSSFile)) {
|
||||
@@ -186,6 +193,10 @@ public class CommonController {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看已上传的文件
|
||||
* @param id
|
||||
|
||||
Reference in New Issue
Block a user