hi all,
I'm trying to get image DPI from dynamic media using java api
It is possible using
https://scene7.com/is/image/client/image?req=props,json
I need to get image props using scene7 api, think I found api that I need but need code examples, can't figure out from the doc how to create proper call.
This should be the method
getAsset(java.lang.String assetHandle, java.lang.String[] responseFields, java.lang.String[] excludeFields, S7Config s7Config)
from
In the response I'll get Scene7Asset
and further I can use getAssetProperties to get info that I need.
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
BTW, Core component makes the call to req=set,json to get the smart crop rendition in client side before delivering the image in the html. You can do props calls incase if you are doing it from front end.
@nbg19a You can reference the Interface just like you are doing for other services in AEM
@Reference
private Scene7Service s7service;
Same for S7Config too and then make the method calls. Make sure you have the DM S7 configured in the AEM instance the code is running otherwise s7service returns null.
BTW, Core component makes the call to req=set,json to get the smart crop rendition in client side before delivering the image in the html. You can do props calls incase if you are doing it from front end.
Thanks,
major problem I'm facing in this moment,
I manage to get results back from searchAssetsByFilename method
scene7Service.searchAssetsByFilename("my-dm-folder", true, true, "my-dm-test-image.png", s7config);
but what ever combination I tried for "getAsset" method
scene7Service.getAsset("my-dm-test-image.png", new String[] {}, new String[] {}, s7config);
I'm getting null in response.
@nbg19a getAsset method looks for asset handle not the name.
Try to get the scene7ID like below from asset metadata node and pass the value and see if you are getting the result
tried that as well, no luck
@nbg19a Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies