Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export type FileExtension =
| 'ace'
| 'avro'
| 'icc'
| 'fbx'
; // eslint-disable-line semi-style

export type MimeType =
Expand Down Expand Up @@ -300,6 +301,7 @@ export type MimeType =
| 'application/x-ace-compressed'
| 'application/avro'
| 'application/vnd.iccprofile'
| 'application/x.autodesk.fbx'
; // eslint-disable-line semi-style

export type FileTypeResult = {
Expand Down
7 changes: 7 additions & 0 deletions core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,13 @@ class FileTypeParser {
};
}

if (this.checkString('Kaydara FBX Binary \u0000')) {
return {
ext: 'fbx',
mime: 'application/x.autodesk.fbx', // Invented by us
};
}

if (
this.check([0x4C, 0x50], {offset: 34})
&& (
Expand Down
Binary file added fixture/fixture.fbx
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@
"cpio",
"ace",
"avro",
"icc"
"icc",
"fbx"
],
"dependencies": {
"readable-web-to-node-stream": "^3.0.2",
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ Returns a `Set<string>` of supported MIME types.
- [`f4b`](https://en.wikipedia.org/wiki/Flash_Video) - Audiobook and podcast ISO base media file format used by Adobe Flash Player
- [`f4p`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format protected by Adobe Access DRM used by Adobe Flash Player
- [`f4v`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format used by Adobe Flash Player
- [`fbx`](https://en.wikipedia.org/wiki/FBX) - Filmbox is a proprietary file format used to provide interoperability between digital content creation apps.
- [`flac`](https://en.wikipedia.org/wiki/FLAC) - Free Lossless Audio Codec
- [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) - Free Lossless Image Format
- [`flv`](https://en.wikipedia.org/wiki/Flash_Video) - Flash video
Expand Down
2 changes: 2 additions & 0 deletions supported.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const extensions = [
'ace',
'avro',
'icc',
'fbx',
];

export const mimeTypes = [
Expand Down Expand Up @@ -297,4 +298,5 @@ export const mimeTypes = [
'application/x-ace-compressed',
'application/avro',
'application/vnd.iccprofile',
'application/x.autodesk.fbx', // Invented by us
];