Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#21452 closed defect (bug) (wontfix)

When uploading media wp_unique_filename() treats capitalisation as being different.

Reported by: husobj's profile husobj Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Filesystem API Keywords:
Focuses: Cc:


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)

#1 @c3mdigital
11 years ago

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version changed from 3.4.1 to 2.5

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.

#2 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.