|
@@ -69,8 +69,9 @@ public class StudentAdminController extends BaseController {
|
|
|
}
|
|
|
|
|
|
String filename = file.getOriginalFilename();
|
|
|
- if (filename != null && !filename.toLowerCase().endsWith(".jpg") && !filename.toLowerCase().endsWith(".png")) {
|
|
|
- throw new StatusException("请上传后缀为jpg或者png的考生头像");
|
|
|
+ if (filename != null && !filename.toLowerCase().endsWith(".jpg") && !filename.toLowerCase().endsWith(".png")
|
|
|
+ && !filename.toLowerCase().endsWith(".jpeg")) {
|
|
|
+ throw new StatusException("请上传后缀为jpg、png或者jpeg的考生头像");
|
|
|
}
|
|
|
studentService.uploadStudentPhoto(loginUser.getId(), file);
|
|
|
}
|