Search in sources :

Example 1 with AppUserProfile

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);
    }
}
Also used : AppUserProfile(org.collectiveone.modules.users.AppUserProfile) Transactional(javax.transaction.Transactional)

Aggregations

Transactional (javax.transaction.Transactional)1 AppUserProfile (org.collectiveone.modules.users.AppUserProfile)1