WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#8739 closed feature request (worksforme)

Media Gallery: Show file size and file type (MIME type)

Reported by: KathyReid Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Gallery Keywords: gallery, mime type, file size, file type
Focuses: Cc:

Description

NOTE: This is a feature request, not a bug
Dev note: I am a PHP programmer and am happy to help work on this time permitting

OBJECTIVE: To have a mechanism such that when inserting a file from the Media Gallery into a Post or a Page, information such as the file size and file type can also be displayed.

For example, inserting 'Myfile.doc' into a Post gives you a link like:
Myfile.doc

I want something that does:
Myfile.doc (Word document, 99kB)
automatically

Change History (4)

comment:1 FFEMTcJ5 years ago

  • Milestone changed from 2.8 to Future Release

comment:2 Denis-de-Bernardy5 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

plugin material

comment:3 hakre4 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Regarding the mime-type (File type) this has not been considered plugin material. It's in core right now. I'll re-open the ticket then because the closing statement has been at least prooved partially wrong.

comment:4 scribu4 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

The information is already there. You can get it by using wp_get_attachment_metadata().

So, to achieve your objective, you can just hook into 'media_send_to_editor'.

Note: See TracTickets for help on using tickets.