There's a MIME type for Braille files, "application/braille", and a common file extension to go with it, "brf". Given the interest in accessibility for core it would be useful to add these to file_default_mimetype_mapping().

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Title: Add mime support for 'application/braille' » Add MIME type support for 'application/braille'
StatusFileSize
new646 bytes

This is patch that a client site was using to add the MIME type.

damienmckenna’s picture

Status: Active » Needs review

Duh, Damien.

damienmckenna’s picture

Issue tags: +Accessibility
damienmckenna’s picture

Version: 7.x-dev » 8.4.x-dev
StatusFileSize
new846 bytes

And this patch is for D8.

Status: Needs review » Needs work

The last submitted patch, 5: drupal-n2720697-5.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review

Rerunning the tests against the correct branch.

andrewmacpherson’s picture

StatusFileSize
new841 bytes

The patch in #5 was missing a comma, fixed here.

andrewmacpherson’s picture

I'm in favour of this - all we're doing here is adding it to a list of known types. The .brf format has been around for a long time (20 years?), though oddly it doesn't appear in the IANA MIME type registry.

andrewmacpherson’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hmm, I spoke too soon.

@Damien - can you provide a citation for the application/braille MIME-type? The .brf file extension is well known, but I'm having trouble finding information about the MIME-type. I've only managed to find one article about BRF which mentions Mime-type at all, and it suggests application/octet-stream.

See https://datatypes.net/open-brf-files

The logic for Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser::guess() returns application/octet-stream as a fallback, so unless we can find evidence of an official (or common?) MIME-type, we don't need to add this file extension at all.

andrewmacpherson’s picture

mgifford’s picture

Status: Postponed (maintainer needs more info) » Needs review

Nothing on the mime-type, but the application/octet-stream was something I was thinking about to. Found this other reference: http://www.nbp.org/ic/nbp/publications/ebraille.html

mgifford’s picture

Status: Needs review » Postponed (maintainer needs more info)

oops.

damienmckenna’s picture

Back in 2006 the Apache developers suggested using "text/plain". So yeah, I'm pushing back on my client to get clarification on why they want it this way.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

damienmckenna’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

I finally heard back from my client's contact, and it doesn't seem to be needed anymore, if it was ever really needed in the first place.

Thanks.