Skip to content

Commit

Permalink
Add extensions for application/mp4 from IANA
Browse files Browse the repository at this point in the history
closes #207
  • Loading branch information
dougwilson committed Feb 6, 2023
1 parent 9ecc7a3 commit 48e4115
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ unreleased
* Add extension `.sql` to `application/sql`
* Add extensions `.aac` and `.adts` to `audio/aac`
* Add extensions `.js` and `.mjs` to `text/javascript`
* Add extensions for `application/mp4` from IANA
* Add extensions from IANA for more MIME types
* Add Microsoft app installer types and extensions
* Add new upstream MIME types
Expand Down
2 changes: 1 addition & 1 deletion db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@
},
"application/mp4": {
"source": "iana",
"extensions": ["mp4s","m4p"]
"extensions": ["mp4","mpg4","mp4s","m4p"]
},
"application/mpeg4-generic": {
"source": "iana"
Expand Down
2 changes: 1 addition & 1 deletion scripts/fetch-iana.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var MIME_TYPE_HAS_CHARSET_PARAMETER_REGEXP = /parameters\s*:[^.]*\bcharset\b/im

;(async function () {
const results = Array.prototype.concat.apply([], [
await get('application', { extensions: /(?:\/(?:automationml-amlx?\+.+|cwl|ecmascript|express|fdf|gzip|(?:ld|manifest)\+json|n-quads|n-triples|pgp-.+|sql|trig|vnd\.(?:age|apple\..+|dbf|mapbox-vector-tile|rar))|xfdf|\+xml)$/ }),
await get('application', { extensions: /(?:\/(?:automationml-amlx?\+.+|cwl|ecmascript|express|fdf|gzip|(?:ld|manifest)\+json|mp4|n-quads|n-triples|pgp-.+|sql|trig|vnd\.(?:age|apple\..+|dbf|mapbox-vector-tile|rar))|xfdf|\+xml)$/ }),
await get('audio', { extensions: /\/(?:aac|mobile-xmf)$/ }),
await get('font', { extensions: true }),
await get('image', { extensions: true }),
Expand Down
1 change: 1 addition & 0 deletions src/iana-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,7 @@
]
},
"application/mp4": {
"extensions": ["mp4","mpg4"],
"sources": [
"https://tools.ietf.org/rfc/rfc4337.txt",
"https://tools.ietf.org/rfc/rfc6381.txt",
Expand Down

0 comments on commit 48e4115

Please sign in to comment.