alfresco - 使用 CMIS API 上传重复文件
问题描述
我想将具有相同名称的两个文件上传到 Alfresco Repository 中(我可以将其上传到 Documentum 中)但我遇到了异常有人可以告诉我如何实现它,因为它是我的用户的业务用例可以上传同名文件吗?请注意,这在 Documentum 中的工作方式与预期相同。
[2/12/20 16:43:03:554 IST] 00000040 SystemErr R org.apache.chemistry.opencmis.commons.exceptions.CmisContentAlreadyExistsException: An object with this name already exists: 01120277 File or folder Book_295_12.xlsx already exists
[2/12/20 16:43:03:555 IST] 00000040 SystemErr R at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:506)
解决方案
为此,您应该覆盖您的 contentModel.xml:
<type name="cm:folder">
<title>Folder</title>
<parent>cm:cmobject</parent>
<archive>true</archive>
<properties/>
<associations>
<child-association name="cm:contains">
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sys:base</class>
<mandatory enforced="false">false</mandatory>
<many>true</many>
</target>
<duplicate>false</duplicate>
<propagateTimestamps>true</propagateTimestamps>
</child-association>
</associations>
<overrides/>
<mandatory-aspects/>
</type>
如您所见,子关联中有重复的参数,值为“false”。你应该把它改成“真”
推荐阅读
- android - 无法在 React Native 中与 Firebase 实时数据库通信
- python - 如何在python django中获取所有父节点但过滤子节点
- dns - 如何阻止浏览器将域名更改为ip地址?
- swift - 如何快速将字符串转换为枚举大小写?
- amazon-web-services - 创建 AWS IoT 解决方案以过滤传入数据并将响应实时发送到 Web App
- java - Java中大数的加法和减法
- c# - ASP.NET Core 的当前上下文中不存在名称“模型,html viewdata”
- jsf - JBoss EAP 7.3 上的 Primefaces 6 文件上传问题
- android - 我需要使用 adb 无线(*自动*)连接到 Android 热点 [脚本可能由 windows 命令行运行]
- mysql - 错误:尝试索引一个零值(upvalue 'cfg')