📌  相关文章
📜  下载图像并以编程方式保存到 aem - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:17.903000             🧑  作者: Mango

代码示例1
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(); }