WordPress.org

Make WordPress Core

Opened 16 months ago

Closed 7 months ago

Last modified 6 months ago

#49063 closed defect (bug) (duplicate)

Media Upload: -1 appended to brand new filename

Reported by: 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 16 months ago.

Download all attachments as: .zip

Change History (5)

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

#2 @SergeyBiryukov
7 months ago

#51304 was marked as a duplicate.

#3 @SergeyBiryukov
7 months ago

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

Duplicate of #48974.

#4 @desrosj
6 months ago

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