diff --git a/core.js b/core.js index 10b596af..eb7deb4c 100644 --- a/core.js +++ b/core.js @@ -64,6 +64,11 @@ function getFileTypeFromMimeType(mimeType) { ext: 'docx', mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', }; + case 'application/vnd.openxmlformats-officedocument.wordprocessingml.template': + return { + ext: 'dotx', + mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + }; case 'application/vnd.openxmlformats-officedocument.presentationml.template': return { ext: 'potx', diff --git a/fixture/fixture.dotx b/fixture/fixture.dotx new file mode 100644 index 00000000..38cf734a Binary files /dev/null and b/fixture/fixture.dotx differ diff --git a/package.json b/package.json index 2eaa2031..e4f63a00 100644 --- a/package.json +++ b/package.json @@ -221,7 +221,8 @@ "drc", "lz4", "potx", - "xltx" + "xltx", + "dotx" ], "dependencies": { "@tokenizer/inflate": "^0.2.6", diff --git a/readme.md b/readme.md index c25c6966..a28dc23b 100644 --- a/readme.md +++ b/readme.md @@ -453,6 +453,7 @@ abortController.abort(); // Abort file-type reading from the Blob stream. - [`dmg`](https://en.wikipedia.org/wiki/Apple_Disk_Image) - Apple Disk Image - [`dng`](https://en.wikipedia.org/wiki/Digital_Negative) - Adobe Digital Negative image file - [`docx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Word document +- [`dotx`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Word template - [`drc`](https://en.wikipedia.org/wiki/Zstandard) - Google's Draco 3D Data Compression - [`dsf`](https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf) - Sony DSD Stream File (DSF) - [`dwg`](https://en.wikipedia.org/wiki/.dwg) - Autodesk CAD file diff --git a/supported.js b/supported.js index 59c27e16..1974d3fb 100644 --- a/supported.js +++ b/supported.js @@ -158,6 +158,7 @@ export const extensions = [ 'lz4', 'potx', 'xltx', + 'dotx', ]; export const mimeTypes = [ @@ -315,4 +316,5 @@ export const mimeTypes = [ 'application/x-lz4', // Invented by us 'application/vnd.openxmlformats-officedocument.presentationml.template', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', ];