Uploading documents with same name to SharePoint 2010

sharepointsharepoint-2010sharepointdocumentlibrary

I have a requirement to allow users to upload documents to a Sharepoint 2010 document library. The document type is defined by a custom content type with a documentid and type field. However, if I try uploading a document with the same name, I get a sharepoint error (I can't tell which one, since I don't have my config file set up properly – I can probably find it tomorrow). Is there some way to allow users to upload documents with the same name, but different metadata? For example, two users want to upload two separate, but with the same name, files. Each will have a different documentid and type. How can I do this?

Thanks

Best Answer

No, unfortunately this is not possible. SharePoint treats the file name as the primary key identifier for a document so if you try to upload a second document with the same name it will assume this is a new version of the file. If you have versioning enabled on the document library, it will add this as a new version. If not, it will overwrite the original file with the new one.

If you need two documents with the same name, you will have to either place them in different folders within a document library or in different document libraries.

Related Topic