I've had this problem a couple of times now, each time it seems to take me ages to work out whats going on.
Would it be possible to do a check in the folder your uploading to (before the upload) that the name of the image doesn't already exist?
I run a monthly photo competition now, Have set 12 folders within a folder January to December. Only I have permission to upload to this folder. This month, the theme is
Twins. I had 2 users send me an image with the same name. twins and Twins. It took me 20 minutes to work out why the software kept renaming one of the existing image titles. It's happened before without me realising it. But it is infrequent, so had a job to remember what it was that caused it before.
A non-case sensitive check of the image name would be really handy. With a pop up warning that a file of the same name already exists.
For a man of your programming abilities, you'd probably find that a pretty easy one to fix
