Answers for "downloa image and save to aem programatically"

0

downloa image and save to aem programatically

InputStream inputStream = null; try { inputStream = getInputStream(downloadUrl); if (is.available() > 0) { Resource resource = resourceResolver.resolve(documentNode.getPath()); Asset asset = DamUtil.resolveToAsset(resource); if (asset != null) { asset.addRendition("original", inputStream, mimeType); session.save(); } inputStream.close(); } } catch (IOException io) { log.info(":::::=============== IOException ===============:::::"); log.info("-------------------> Exception ==> {}", io.getMessage()); io.printStackTrace(); }
Posted by: Guest on February-23-2021

Code answers related to "downloa image and save to aem programatically"

Browse Popular Code Answers by Language