Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#9924 closed enhancement (fixed)

In Media Library, if file does not have an extension, try to fallback to mime type

Reported by: mdawaffe Owned by:
Milestone: 3.0 Priority: normal
Severity: minor Version:
Component: Media Keywords: has-patch commit
Focuses: Cc:


In the Media Library, each file's extension is listed in that file's row (e.g. "PDF" or "JPG").

In some custom upload solutions, the file may not have an extension, but does have a mime type stored in the posts table.

Attached displays the mime type (stripping off "image/" for image mime types) if no extension is found.

Attachments (2)

9924.diff (1.6 KB) - added by mdawaffe 6 years ago.
9924-updated.diff (1.7 KB) - added by xibe 6 years ago.
Updated patch.

Download all attachments as: .zip

Change History (7)

6 years ago

#1 @Denis-de-Bernardy
6 years ago

  • Keywords dev-feedback removed

still applies clean, and +1

#2 @ryan
6 years ago

  • Milestone changed from 2.9 to 3.0

6 years ago

Updated patch.

#3 @xibe
6 years ago

Patch updated to latest trunk.

#4 @nacin
6 years ago

  • Keywords commit added

This makes sense to do.

#5 @nacin
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13541]) Fall back to displaying mime type when file has no extension. fixes #9924 props mdawaffe

Note: See TracTickets for help on using tickets.