Make WordPress Core

Opened 9 months ago

Last modified 9 months ago

#49063 new defect (bug)

Media Upload: -1 appended to brand new filename

Reported by: eri32s98 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3.2
Component: Upload Keywords: close
Focuses: Cc:


There appears to be an edge case where when a new filename ends with a pattern like -NUMBERxNUMBER (e.g. -9x9), a -1 will get appended to the filename as it was a duplicate.

To reproduce:

  • name a file something like unique-filename-3x3
  • upload it to the Library

Tested on a fresh install:

Attachments (1)

librarary-filename--1.png (76.2 KB) - added by eri32s98 9 months ago.

Download all attachments as: .zip

Change History (2)

#1 @SergeyBiryukov
9 months ago

  • Component changed from General to Upload
  • Keywords close added

Hi there, welcome to WordPress Trac! Thanks for the report.

This is done intentionally in [46822] / #42437, to prevent name collisions with existing or future image sub-size file names.

Note: See TracTickets for help on using tickets.