Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Asset creation and replication doesn't work for renditions

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.

1 Reply

Avatar

Level 2
Did you find a solution for this? I just ran into similar issue.