when users upload images/directories, apart from checking if the file exists in the current directory( ex: documents folder) to which it is set-up to upload, could we check in another specific directory(ex: repository_documents) if that file exists or not. After checking in the specific directory, if it does not exist then it should upload the document into the current directory. If it exists either display a message to change the file or automatically change the file name to (xxx_todaysdate.doc) and upload.
Example:
Current directory or directory to be uploading documents: /documents
Directory to be checked for file existence: /repository_documents