Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Compare Sizes Of Assets

vdhim23
Level 5
Level 5

Hi,

I want to compare the size of asset as below :

AssetDetails asset = new AssetDetails(assetResource);

if(asset.getSize() < 200KB) {

     // Do Something

}

As size returns string, so can't use this syntax. Any idea to compare the size of assets in AEM?

Thanks,

1 Accepted Solution
Rima_Mittal
Correct answer by
Level 4
Level 4
1 Reply
Rima_Mittal
Correct answer by
Level 4
Level 4