It would be nice if we could restrict the audio file formatter to only file types that have a mime type that match audio/*, and the same for the new video formatter for anything that has video/* mime types. This would be nice since we could replace how the Image field formatter only shows up for the Image file type.

Comments

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new6.37 KB

Initial patch to add a 'file types' restriction to hook_file_formatter_info(). Also cleans up providing hook_file_formatter_info() from within hook_field_formatter_info().

dave reid’s picture

Errant include in file_entity.file_default_displays.inc.

dave reid’s picture

aaron’s picture

Status: Needs review » Reviewed & tested by the community

This works as advertised.

dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.