更新同名Alfresco

1 java methods alfresco

我想将文件更新为Alfresco,但是当Alfresco有一个具有相同名称的文件时,它会使例外情况为"重复的子名称".我可以更新具有相同名称的文件并保留所有文件.例如,我上传名为"fileNew"的文件然后我尝试再次上传一个具有相同名称的文件(因此他们只有Alfresco的不同版本)

And*_*fan 5

看起来你实际上没有更新,但试图创建一个已经存在的孩子.Alfresco要求子名称是唯一的(看看contentModel.xml)

  <type name="cm:folder">
     <title>Folder</title>
     <parent>cm:cmobject</parent>
     <archive>true</archive>
     <associations>
        <child-association name="cm:contains">
           <source>
              <mandatory>false</mandatory>
              <many>true</many>
           </source>
           <target>
              <class>sys:base</class>
              <mandatory>false</mandatory>
              <many>true</many>
           </target>
           <duplicate>false</duplicate>
           <propagateTimestamps>true</propagateTimestamps>
        </child-association>
     </associations>
  </type>
Run Code Online (Sandbox Code Playgroud)

确保在共享中使用"更新"(在旧的Web客户端中)或"上传新版本",而不是"添加内容"或"上传".