Hello,
I am trying to modify metadata/dc:description when I create an asset, but changes does not commited on CRX.
My asset is a PDF and my code:
Asset assetFitxer = assetManager.createAsset(pathDAM, inStream, mimeType, true);
Resource metadataRes = assetFitxer.adaptTo(Resource.class).getChild("jcr:content/metadata");
ModifiableValueMap map = metadataRes.adaptTo(ModifiableValueMap.class);
map.put("dc:description", newCode);
ResourceResolver rs = metadataRes.getResourceResolver();
rs.commit();
--> PDF's file has own metadata and I need to modify dc:description
If I did commit before to change metadata and after it, changes do not save yet.
I think workflow dam asset does not end before I try to change dc:description, so metadata field has original value.
Any suggestions?
Thanks!