#21452 closed defect (bug) (wontfix)
When uploading media wp_unique_filename() treats capitalisation as being different.
Reported by: | husobj | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.5 |
Component: | Filesystem API | Keywords: | |
Focuses: | Cc: |
Description
On most web servers "Photo.jpg" and "photo.jpg" can be treated as different files.
The problem is when backing up a local copy (to my Mac) it will not let both these files exist at the same time - it wants to replace one with the other as it treats lowercase and uppercase as the same.
I suggest that we should do the same with uploads so that if "Photo.jpg" exisits and you upload "photo.jpg" is is renamed to a unique name.
I guess this would require a fix in the wp_unique_filename() function.
Change History (2)
Note: See
TracTickets for help on using
tickets.
I would love to see the filename run through
strtolower()
but it should probably be done on sanitize_filename(). I think the back compat on a change like this would cause problems so I'm closing as wont fix. If anyone has a case for doing this please re open.