Duplicate contents

Enonic version: 7.4.1
OS: Ubuntu

Hi guys, I want to duplicate contents to another folder, so I am creating new contents coping properties like data, displayName, etc… This was working, but I found a problem with contents of type ‘media:document’, ‘media:archive’, ‘media:image’. They raise an error while I’m creating this new contents, this error is related to the attachments since I can’t copy this property.
What should I do to duplicate this contents ( without content studio! ), can you help me with that?!

  1. Get the list of attachments of the source content.
  2. For each attachment in the list, get its binary stream and…
  3. …use it to create a new attachment in the target content.
1 Like