3

How to copy paste multimedia components from one publication to the other publication using SDL Tridion core service API ?

We have multimedia components which have to be copied to another publication. unable to assign image to the new component in new publication from old one.

1
  • Hi Shreshtha - did you get a solution to this? Please do share... Commented May 18, 2015 at 11:45

2 Answers 2

3

Just like using the Tridon CM gui can't copy content across publications, you can't copy content using a core service function. You can off course do the following

  • read the component you wish to copy from publication A
  • create a new component in publication B
  • copy all data from the original component into the newly created component.

You will have to pay attention with file names. If publication B is a child of publication A (or the other way around), you will get an error if you try to create a component with the same name in the same folder. If both publications are not in the same Blueprint chain than naming conflicts may be less likely but are something your architecture must account for.

A question similar to yours has already been answered, you can find some useful code samples here https://tridion.stackexchange.com/a/1105/242

3

Shreshtha - as you see - you cannot do this through the GUI but it is possible via the Core Service as mentioned by Harald.

If this is a one-off you could consider using Content Porter or, as you've mentioned this is Multimedia items, you could copy and paste these via WebDAV and the appropriate cartridges (see the post from Alvin here http://www.createandbreak.net/2012/12/webdav-is-fast-upload-multimedia-is.html for some useful information).

In all cases - the Blueprint chain must be considered and naming conflicts etc. avoided.

Not the answer you're looking for? Browse other questions tagged or ask your own question.