It's a good idea to warn user when trying to upload a file that already exists instead of just override it.
It was reported in MDL-805
I post a solution there, hope to be useful
filing separate issue for clam integration,
the old file uploading will be replaced by repository pickers, the file overwriting trouble should be solved there - thanks