Solved
How to access dam XML file name in Java class
I need to access sample_content.xml file name present in DAM into the Java class and i need to store it in a method
I need to access sample_content.xml file name present in DAM into the Java class and i need to store it in a method
Hi @vineel_k,
You can use mix of Sling and Asset java api to get any asset name.
Resource resource = resourceResolver.getResource("/content/dam/sample_content.xml");
Asset asset = resource.adaptTo(Asset.class);
String assetName = asset.getName();
Having asset object you can also get all other information about specific asset.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.