use of org.collectiveone.modules.users.AppUserProfile in project CollectiveOneWebapp by CollectiveOne.
the class FileService method uploadImageProfile.
@Transactional
public void uploadImageProfile(UUID userId, MultipartFile file) {
String key = "ProfileImages/" + userId.toString();
FileStored fileUploaded = handleFileUpload(userId, key, file, null);
if (fileUploaded != null) {
AppUserProfile profile = appUserProfileRepository.findByUser_C1Id(userId);
profile.setUploadedPicture(fileUploaded);
appUserProfileRepository.save(profile);
}
}
Aggregations