use of sic.util.BASE64DecodedMultipartFile in project sic by belluccifranco.
the class EmpresaServiceImpl method guardarLogo.
@Override
public String guardarLogo(byte[] imagen) {
try {
String filename = String.valueOf(new Date().getTime());
MultipartFile file = new BASE64DecodedMultipartFile(imagen, filename);
return amazonService.saveFileIntoS3Bucket(filename, file.getInputStream(), file.getContentType());
} catch (IOException ex) {
LOGGER.error(ex.getMessage());
throw new BusinessServiceException(ResourceBundle.getBundle("Mensajes").getString("mensaje_error_IOException"));
}
}
Aggregations