1.update avatar size to 512 X 512

main
Gary 11 months ago
parent cca412438a
commit d6de6a01cc

@ -57,4 +57,6 @@ public class Constants {
public static final Integer LENGTH_70 = 70;
public static final Integer LENGTH_150 = 150;
public static final Integer LENGTH_512 = 512;
}

@ -145,7 +145,7 @@ public class MyController extends BaseController {
@VerifyParam(required = true) MultipartFile file) throws IOException {
UserLoginDto userLoginDto = getUserLoginDto(authorization);
byte[] thumbnail = ScaleFilter.createThumbnail(file.getInputStream(), Constants.LENGTH_70, Constants.LENGTH_70);
byte[] thumbnail = ScaleFilter.createThumbnail(file.getInputStream(), Constants.LENGTH_512, Constants.LENGTH_512);
String avatarName = userLoginDto.getUserId() + "_" + idWorker.nextId()
+ StringTools.getFileSuffix(file.getOriginalFilename());
String filePath = USER_AVATAR_DIRECTORY + avatarName;

Loading…
Cancel
Save