Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#49063 closed defect (bug) (duplicate)

Media Upload: -1 appended to brand new filename

Reported by: eri32s98's profile eri32s98 Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3.1
Component: Upload Keywords:
Focuses: Cc:

Description

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 5 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
5 years 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.

#2 @SergeyBiryukov
4 years ago

#51304 was marked as a duplicate.

#3 @SergeyBiryukov
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #48974.

#4 @desrosj
4 years ago

  • Keywords close removed
  • Version changed from 5.3.2 to 5.3.1
Note: See TracTickets for help on using tickets.