Check if file exists in DAM or Site admin of Adobe Experience Manager | Community
Skip to main content
New Participant
Oct 5, 2017 10:18 PM UTC
Solved

Check if file exists in DAM or Site admin of Adobe Experience Manager

Hi everyone,

Is there an efficient way to check if a file/resource exists in the system?

Thank you!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 6, 2017 6:47 PM UTC

You can use this API to see if a resource exists a specific location:

Resource res = resourceResolver.getResource(location);

4 replies

halinggAuthor
New Participant
Feb 24, 2018 10:53 AM UTC

Is there a way to do this using a curl command?

Thank you for helping!

Translate
Singaiah_Chintalapudi
Level 7
Oct 6, 2017 8:49 PM UTC

You can use the Sling API as Scott mentioned.

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 6, 2017 6:47 PM UTC

You can use this API to see if a resource exists a specific location:

Resource res = resourceResolver.getResource(location);

Translate
Himanshu_Singhal
New Participant
Oct 6, 2017 7:34 AM UTC

Hi,

To check if the resource exists in JCR, you can use ResourceUtil API.

ResourceUtil ("The Adobe AEM Quickstart and Web Application.")

Regards

Himanshu

Translate