Firstly, I think the files should have unique names by default - nevertheless a problem came up yesterday in which one member's images were being displayed in place of another member's images because they had the same file names (it could possibly be a case sensitivity issue come to think of it).
I have a Matrix cell that contains a Safecracker file field. The purpose of this is to allow members to upload a series of photos, captions etc to an entry they are creating via the Safecracker form.
The problem I have is that it appears some of the images being uploaded have the same filenames. In my tests it appears that the files are appended with a number if there is a duplicate so I'm a little confused as to how this happened in the first place.
My 'solution' would be to prefix the filenames with the member ID. This should ensure that even if an image is overwritten it will be by the same member.
I found this extension https://github.com/rsanchez/safecracker_file_add_prefix which could do the trick but I am having trouble getting it to work in a Matrix - I think it may be a step too far.
So I'm looking for ideas and/or a solution!
Maybe the answer is to somehow convert the filenames to lowercase?
UPDATE: The issue was definitely caused by case insensitivity. The image pool.jpg was being displayed in place of Pool.jpg The server allows for the difference between upper and lowercase but it appears that ExpressionEngine or Matrix does not.