Asset creation and replication doesn't work for renditions

Avatar

Avatar

akashIntel

Avatar

akashIntel

akashIntel

18-07-2019

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.

Accepted Solutions (0)

Answers (0)