|
@ -281,6 +281,7 @@ public class OssController { |
|
|
public Result<UploadImgResultDTO> uploadVariedFile(@RequestParam("file") MultipartFile file) { |
|
|
public Result<UploadImgResultDTO> uploadVariedFile(@RequestParam("file") MultipartFile file) { |
|
|
String fileName = file.getOriginalFilename(); |
|
|
String fileName = file.getOriginalFilename(); |
|
|
String format = "-" + fileName.substring(fileName.lastIndexOf(".") + NumConstant.ONE) + "-"; |
|
|
String format = "-" + fileName.substring(fileName.lastIndexOf(".") + NumConstant.ONE) + "-"; |
|
|
|
|
|
format = format.toLowerCase(); |
|
|
//1.校验上传文件类型
|
|
|
//1.校验上传文件类型
|
|
|
if (!ModuleConstant.PROJECT_FILE_CONTENT.contains(format)) { |
|
|
if (!ModuleConstant.PROJECT_FILE_CONTENT.contains(format)) { |
|
|
log.error(String.format("上传文件类型格式错误,暂不支持此类文件上传,文件名->%s", fileName)); |
|
|
log.error(String.format("上传文件类型格式错误,暂不支持此类文件上传,文件名->%s", fileName)); |
|
|