Regardless of what Google indexes, the actual issue is duplicated content. Not duplicate filenames or titles. Duplicated content is when you have several URLs with pretty much the exact same content, everything else should not worry you at all.
Can you put in next update this,i think is very important.
To script have a system when the same title is uploaded couple of times,title will be for example: Untitled1 Untitled2 Untitled3 etc. ?
With that Google will not index example "Untitled" title name 100 or 1000 times,every title will be unique.And to affect all old submitted titles.
Google will definitely not know about this,because you are developer of this script.How Google can know did script generate and index duplicate titles? You know your code,you can give us answer about this.
If you really believe that Google is so stupid to don't crawl content just for having the same title then ask them directly about that.
I know that they crawl content even with the same title and that they actually take in consideration the complete context of the alleged page content. If your uploads don't have description and other relevant data, it is most likely that they will only index the most relevant result as they won't care to index content that's not relevant.
Even forcing unique titles you won't get indexed results because at the end of the day they will detect that the only relevant element is just a title and they won't index because of lack of relevancy.