Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298267

File extensions "numbers" and "pages" in field.field.media.document.field_media_document.yml are missing from ExtensionMimeTypeGuesser

$
0
0

Problem/Motivation

Some file extensions in field.field.media.document.field_media_document.yml are missing from ExtensionMimeTypeGuesser, which can cause some issues as reported in #3466462: Fix handling of unknown file extensions in FileMediaFormatterBase.

The following file extensions are missing completely: fodt fods fodp fodg numbers pages

The .key extension is present, but is mapped to application/pgp-keys, to which it was historically mapped (along with .asc). Its official media type according to IANA is now application/vnd.apple.keynote, so perhaps it's time to update the mapping.

Steps to reproduce

  1. Manually configure the *.fodt, *.fods, *.fodp, *.fodg, *.numbers or *.pages file extension as an allowed upload file type, or have them configured automatically via the document media type recipe, the standard profile or the Umami demo profile.
  2. Upload one of these file types to a file field or as a media document.
  3. The resulting file entity will have the fallback "application/octet-stream" MIME type (which is visible in the database, and also sent as an HTTP header for private downloads) rather than an appropriate specific MIME type.

Proposed resolution

  • Re-map .key from application/pgp-keys to application/vnd.apple.keynote
  • Map .numbers application/vnd.apple.numbers
  • Map .pages to application/vnd.apple.pages
  • Map .fodg to application/vnd.oasis.opendocument.graphics-flat-xml
  • Map .fodp to application/vnd.oasis.opendocument.presentation-flat-xml
  • Map .fods to application/vnd.oasis.opendocument.spreadsheet-flat-xml
  • Map .fodt to application/vnd.oasis.opendocument.text-flat-xml
  • While we're here, fix alphabetical order of application/json

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 298267

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>