EDIorg / EMLassemblyline

R package for creating EML metadata
https://ediorg.github.io/EMLassemblyline/
MIT License
27 stars 13 forks source link

Common MIME types are not recognized #135

Open clnsmth opened 1 year ago

clnsmth commented 1 year ago

EMLassemblyline assign a value to /element(*,PhysicalType)/dataFormat/externallyDefinedFormat/formatName based on mime::guess_type() (see code). This function maps the data entity's file extension to a MIME type. However, this map is missing several common file extensions (e.g. .bz2 = application/x-bzip2) thus returning a value of "Unknown".

A potential solution here is to extend the list of MIME types recognized by mime::guess_type() using the mime_extra parameter, which can reference a curated list of other MIME types.

However, do note: