Expand my Community achievements bar.

Who Me Too'd this topic

Avatar

Former Community Member

Hello,

We are trying to create asset and then replicate it through API available for Asset Manager and Replicator service.

Asset is created in author, it is replicated to publish as well. But the renditions are not replicated to publish. Is there anything addition we need to do so that renditions are also replicated.

The reason being that the replicator service is running before renditions are generated. What could be solution to it ? Adding some delay in it ? Don't want to harcode the delay value as well.

createReplicateAsset(String documentPath, InputStream stream,

String contentType, ResourceResolver resourceResolver, Session session) {

AssetManager assetManager = resourceResolver.adaptTo(AssetManager.class);

assetManager.createAsset(documentPath, stream, contentType, true);

replicator.replicate(session, ReplicationActionType.ACTIVATE, documentPath);

}

Regards,

Akash B.

Who Me Too'd this topic