how to get each dam asset size information with query builder

Avatar

Avatar

keehwan1

Avatar

keehwan1

keehwan1

15-10-2020

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

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Manjunath_K

Avatar

Manjunath_K

Manjunath_K

15-10-2020

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

 

 

Answers (1)

Answers (1)

Avatar

Avatar

narendragandhi

Avatar

narendragandhi

narendragandhi

15-10-2020

 

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