how to get each dam asset size information with query builder | Community
Skip to main content
Level 3
October 15, 2020
Solved

how to get each dam asset size information with query builder

  • October 15, 2020
  • 2 replies
  • 4363 views

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

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Manjunath_K

Hi @keehwan1

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

 

Query Builder console result : 

 

 

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 :

 

-Manjunath

 

 

2 replies

Manjunath_K
Manjunath_KAccepted solution
Level 7
October 15, 2020

Hi @keehwan1

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

 

Query Builder console result : 

 

 

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 :

 

-Manjunath

 

 

keehwan1Author
Level 3
October 15, 2020
Thank you so much, Manjunath
narendragandhi
Community Advisor
Community Advisor
October 15, 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