This commit is contained in:
tangzh 2025-07-19 21:46:37 +08:00
parent 6d5d6c7942
commit 92060ffcf6

View File

@ -94,7 +94,7 @@ public class BusUserController {
throw new BadRequestException("只能上传图片"); throw new BadRequestException("只能上传图片");
} }
String type = FileUtil.getFileType(suffix); String type = FileUtil.getFileType(suffix);
String path = fileProperties.getPath().getPath(); String path = fileProperties.getPath().getAvatar();
File uploadFile = FileUtil.upload(file, path + type + File.separator); File uploadFile = FileUtil.upload(file, path + type + File.separator);
if(ObjectUtil.isNull(uploadFile)){ if(ObjectUtil.isNull(uploadFile)){
throw new BadRequestException("上传失败"); throw new BadRequestException("上传失败");