Skip to main content
Something I was thinking about this afternoon when working with the K2DocAttachment control is the ability to capture and handle a duplicate doc name posting event. It appears that if a new document is uploaded that has the same name as a previous doc, the new one just overwrites the old and it doesn't give you any indication that this is happening. Is there any way to capture and handle this and possibly prevent it from happening? I have thought about instructing the users to name their documents in such a way to help prevent this, but it would be nice to handle this from a code perspective just in case...
ironically I am wondering the same thing a year later. Does anyone have any idea how to keep the DocAttachment control from overwriting an existing document of the same name?

Michael Fischer
Hi Guys,

The doc attachment control is just an interface to the document residing in SPS, uploading documents to SPS with the same name will not overwrite the document, it will actually create a new version of that document. Looking at the doc in SPS you will only see the 1 doc, opening this doc will open the latest one, to have a look at the various version of the doc drop the menu down in SPS and click on the Version History menu. The doc attachment control will always open the latest version available of that document. Note: Version history must be enabled on the document library in SPS.

Is there any ideas how to check duplicate doc names when using K2DocAttachment control? This question is still actual for me. Thanks for advise.


Reply