cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload files with same name into single folder?

divyabharathipa
Champ in-the-making
Champ in-the-making
Hi Team,

I am new to alfresco. I did folder creation and file upload into that folder using alfresco cmis. Now I have a question that, If i have same file name with two documents . I need to upload 2 files to same folder. How it is possible? I heard about versioning concept ? How to call that one? After upload or before upload ? Please do the needul.

I tried like :

        protected void ConnectingUsingAtomPub_CreateDocument(IFolder newFolder)
        {
         IDocument doc=newFolder.CreateDocument(properties, contentStream, null);
         ConnectingUsingAtomPub_CreateDocument_Version(doc);
        }
          private void ConnectingUsingAtomPub_CreateDocument_Version(IDocument document)
        {
        }
Please suggest me the steps how to face that situation.

Thanks,
Divya Palivela
4 REPLIES 4

openpj
Elite Collaborator
Elite Collaborator
You should change the default behavior of the cm:contains association in Alfresco. Inside the file alfresco/model/contentModel.xml you should change the parameter "duplicate" inside the cm:contains configuration.

Changing the value of the duplicate parameter to the "true" value will allow you to store two different files with the same name.

Hope this helps.

Sorry Piergiorgio Lucidi. Please let me know how to do that with c# coding. Versioning concept I think in CMIS alfresco.

mrogers
Star Contributor
Star Contributor
Changing the cm:contains association is alfresco configuration, not Java or C# coding.

However trying to have two files with the same name is unusual.  For example you can't do it on windows, or linux so why do it in alfresco?   

I suggest you think about what you are asking and perhaps reword your questions.

bharathi
Champ in-the-making
Champ in-the-making
Hi mrogers.. I think Divya is trying to ask about Versioning in DOTCMIS..