简体   繁体   English

tridion 2009 - 将多媒体组件从一个出版物复制到另一个出版物

[英]tridion 2009 - copy multimedia component from one publication to another

How do I copy a image component, from one publication to the other using api's in 2009? 如何在2009年使用api将图像组件从一个出版物复制到另一个出版物?

Is this possible? 这可能吗? I tried using 我试过用

    newComponent.Multimedia.SetUploadedMultimediaFilename(originalComponent.Multimedia.Filename);

+newComponent.save(); + newComponent.save(); where my newComponent is the one that I am creating from the original component. 我的newComponent是我从原始组件创建的那个。

    <tcm:Error xmlns:tcm="http://www.tridion.com/ContentManager/5.0"                                                         ErrorCode="80040325" Category="3" Source="Kernel" Severity="2">
    - <tcm:Line ErrorCode="80040325" Cause="false" MessageID="16137">
    - <![CDATA[ Unable to save Component (tcm:0-0-0).
      ]]> 
      <tcm:Token>RESID_4574</tcm:Token> 
      <tcm:Token>RESID_4418</tcm:Token> 
      <tcm:Token>tcm:0-0-0</tcm:Token> 
      </tcm:Line>
    - <tcm:Line ErrorCode="80040325" Cause="true" MessageID="16010">
    - <![CDATA[ Operation is not supported on a new item (or on a null URI).
      ]]> 
      </tcm:Line>
    - <tcm:Details>
    - <tcm:CallStack>
      <tcm:Location>UtilitiesBL.AssertValidURI</tcm:Location> 
      <tcm:Location>ComponentBL.CheckMultiMediaProperties</tcm:Location> 
      <tcm:Location>ComponentBL.Create</tcm:Location> 
      <tcm:Location>XMLState.Save</tcm:Location> 
      <tcm:Location>Component.Save</tcm:Location> 
      </tcm:CallStack>
      </tcm:Details>
      </tcm:Error>

That won't work... you'll need to first save the multimedia item to a file location, then use this location to upload it from. 这不起作用......您需要先将多媒体项保存到文件位置,然后使用此位置从中上传。 All you're doing now is telling Tridion that there is a file at originalComponent.Multimedia.Filename which may or may not be true. 你现在正在做的就是告诉Tridion在originalComponent.Multimedia.Filename上有一个文件,它可能是也可能不是。

N ñ

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tridion 2009 - 从组件模板发布另一个组件 - Tridion 2009 - Publish another Component from a Component Template SDL Tridion 2009 SP1:Content Porter 2009 SP1-无法将子发布更改为父发布 - SDL Tridion 2009 SP1: Content Porter 2009 SP1 - It is not possible to change a child Publication into a Parent Publication 在Tridion Templating类中创建多媒体组件 - Creating a multimedia component in Tridion Templating class 在Tridion中上载大型多媒体组件时出错 - Error uploading the large size multimedia component in tridion 从Tridion多媒体组件中的XML文件中读取UTF-8内容 - 模板化C# - Read UTF-8 content from the XML file in Tridion multimedia component - Templating C# Tridion核心服务:如何更新组件/多媒体组件的系统属性 - Tridion Core Service: How to update system properties of component/ multimedia component Tridion核心服务如何下载多媒体组件的二进制文件 - Tridion core service How to download binary file of a multimedia component Tridion 2009 TBB:如何确定页面是否发布到特定的发布目标? - Tridion 2009 TBB: How do I determine if a Page is published to particular publication target? 我们可以在Tridion 2009中基于结构组定义发布目标吗 - Can we have publication targets defined on the basis of structure groups in Tridion 2009 使用Tridion Anguilla框架获取多媒体组件字节数组? - Get multimedia component byte array using Tridion Anguilla framework?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM