We create a AEM pages using PageManager class. Like this I want to create a XML file dynamically and store in DAM location. Can anyone tell me what API should be used to create a XML files in AEM?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You need to use Asset API
com.day.cq.dam.api.AssetManager assetMgr = resourceResolver.adaptTo(com.day.cq.dam.api.AssetManager.class); assetMgr.createAsset(<attachmentPath>, <input stream>,<contentType>, true); for XML files, contentype = 'application/xml'
Hi,
You need to use Asset API
com.day.cq.dam.api.AssetManager assetMgr = resourceResolver.adaptTo(com.day.cq.dam.api.AssetManager.class); assetMgr.createAsset(<attachmentPath>, <input stream>,<contentType>, true); for XML files, contentype = 'application/xml'
Thank you Arun_Patidar