Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

how to get each dam asset size information with query builder

Avatar

Level 3

Hi

I am looking for query on how to select all dam assets(pdf, jpg and etc ) over 1 mega bites.

These are queries of what I can think of.

But when I checked  the results, they are not correct.

Could you please provide advice on how to get all dam assets bigger that 1 mega bites using query builder?

Thanks,

Keehwan

 

<jpg>

type=dam:Asset
path=/content/dam
nodename=*.jpg

property=dam:size
lowerBound=1048576

p.limit=-1

 

<pdf>

type=dam:Asset
path=/content/dam/gnb
nodename=*.pdf

property=dam:size
lowerBound=1048576

p.limit=-1

 

1 Accepted Solution

Avatar

Correct answer by
Level 8

Hi @keehwan1

Please find below query to find all jpg images with more than 1MB size.

 

Query Builder console result : 

querybuild-img.PNG

 

 

Query :

path=/content/dam
nodename=*.jpg
rangeproperty.property=@jcr:content/metadata/dam:size
rangeproperty.lowerBound=1048576
rangeproperty.lowerOperation=<
p.limit=-1

 

1.4+ mb size image in DAM :

image-crx.png

 

-Manjunath

 

 

View solution in original post

4 Replies

Avatar

Correct answer by
Level 8

Hi @keehwan1

Please find below query to find all jpg images with more than 1MB size.

 

Query Builder console result : 

querybuild-img.PNG

 

 

Query :

path=/content/dam
nodename=*.jpg
rangeproperty.property=@jcr:content/metadata/dam:size
rangeproperty.lowerBound=1048576
rangeproperty.lowerOperation=<
p.limit=-1

 

1.4+ mb size image in DAM :

image-crx.png

 

-Manjunath

 

 

Avatar

Level 7
 

Hi @keehwan1 

 

Not sure about the use case for writing these queries but you can find those assets by using the OOTB Filter view under Assets. Here are the steps -

 

1) Navigate to http://localhost:4502/assets.html/content/dam

2) Switch to Filter view from the panel present on the top left.

3) This will allow you to select the path, file type, file size etc.

4) You can save your selected filter as a collection and then navigate to http://localhost:4502/mnt/overlay/dam/gui/content/collections.html/content/dam/collections if you would like to download all those images etc.

 

Thanks

Narendra