Can we move assets on publish instance from one location to another | Community
Skip to main content
Level 2
February 11, 2022
Solved

Can we move assets on publish instance from one location to another

  • February 11, 2022
  • 1 reply
  • 911 views

Is it possible to move an assets from one folder to another using javacode on publisher instance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

Hi @ashwinissrinivas, technically this is possible, you can use one of below APIs:

However please be aware that in general due to AEM architecture (author, publish) it is recommended to do the move operation on Author instance and propagate results of this operation to all Publish instances using replication mechanism.

If at some point you will decide to do it on Publish, be aware you will lose connection between author and publish for given asset, so e.g. you will not be able to unpublish asset.

Initiating move from Publish should use revers replication that will send data to author and then replicate changes to all other Publish servers. This scenario is much more complicated comparing to just do your changes on Author and replicate to all Publish instances.

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
February 11, 2022

Hi @ashwinissrinivas, technically this is possible, you can use one of below APIs:

However please be aware that in general due to AEM architecture (author, publish) it is recommended to do the move operation on Author instance and propagate results of this operation to all Publish instances using replication mechanism.

If at some point you will decide to do it on Publish, be aware you will lose connection between author and publish for given asset, so e.g. you will not be able to unpublish asset.

Initiating move from Publish should use revers replication that will send data to author and then replicate changes to all other Publish servers. This scenario is much more complicated comparing to just do your changes on Author and replicate to all Publish instances.

Level 2
February 11, 2022

Got it @lukasz-m thank you so much for the detailed explanations. As per one of the requirement I wanted the clarity if this is possible.