Expand my Community achievements bar.

SOLVED

XPATH Query for large dam:Assets

Avatar

Level 2

I am trying to find assets larger than "XX" bytes in the repository using an XPATH query

Found the equality operation to work in my xpath query

/jcr:root/<folder to be looked in>/element(*, dam:Asset)[(jcr:content/metadata/@dam:size)=('2048')]

 

But when I use the operators for > or <, the query fails to return results although I know there are several such assets in my repository.Is the property having a Long datatype being read as a String? I tried applying 

/jcr:root/<folder to be looked in>/element(*, dam:Asset)[(jcr:content/metadata/@dam:size)>xs:Long('2048')]

but this doesn't work either. Any suggestions

1 Accepted Solution

Avatar

Correct answer by
Level 10

To retrieve the actual size of a DAM need to use https://forums.adobe.com/message/5016043

You would have to write a script to do this. The script would have to traverse through all the assets under folder and calculate the size of each asset. Look at OOB http://localhost:4502/etc/reports/diskusage.html

With said above Still would you like to proceed with depending on  dam:size?

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

To retrieve the actual size of a DAM need to use https://forums.adobe.com/message/5016043

You would have to write a script to do this. The script would have to traverse through all the assets under folder and calculate the size of each asset. Look at OOB http://localhost:4502/etc/reports/diskusage.html

With said above Still would you like to proceed with depending on  dam:size?