I have a simple requirement, yet it seems very complex to implement. When users upload a file to the document library, I want to check if it exists. If it exists I need to rename the file by appending the date (and time) to the end of the file - so that it is unique.
The obvious answer is to use event receivers. When you overwrite a document, It is the update events that fire not the adding events.
My problem is that I cannot tell whether the file is being overwritten or if there it is a property update. Am I missing something obvious?