AnsweredAssumed Answered

Alfresco Share cm:name uniqueness

Question asked by milhy on Jun 7, 2013
Latest reply on Jun 7, 2013 by milhy
Hello everyone,
in Alfresco Share I need to upload multiple documents with the SAME FILENAME into one folder. I have different versions of file content, each one saved separatedly in the file with the same name. Differencies between files are managed through my custom metadata. From Alfresco Share I need to download each file with the given (same) name. I can't use file versioning, the requirement is to have files separatedly in one folder.
Problem is with the default attribute cm:name, which cannot be the same for objects in one folder. I tried to change the default ContentModel.xml file, where is section: <type name="cm:folder"> and I changed type association value <duplicate> from FALSE to TRUE. I know, that extending default content model by that is not the best way, but it works. From this time I can upload more files with the same filename into one folder. Unfortunatelly, side effect of this change is impossibility to create new sites in Alfresco Share. In my log is:

Method public org.alfresco.repo.jscript.ScriptableHashMap,java.lang.String,int,boolean) threw an exception when invoked on with arguments of types [null,java.lang.String,java.lang.Integer,java.lang.Boolean,]
The problematic instruction:
==> assignment: managers=site.listMembers(null, "SiteManager", 0, true)?keys [on line 48, column 17 in org/alfresco/repository/site/site.lib.ftl]
in user-directive siteJSONManagers [on line 2, column 1 in org/alfresco/repository/site/site.lib.ftl]
in user-directive siteLib.siteJSON [on line 2, column 1 in org/alfresco/repository/site/]

I know, that this is the result of enabling duplicates. I can normally create sites when I revert changes in the ContentModel.xml file.

Please, don't you have eny experience or recomendations, how to make my goal in some different way?