Skip to content

Commit

Permalink
Add support for POTX
Browse files Browse the repository at this point in the history
  • Loading branch information
sly7-7 committed Dec 24, 2024
1 parent 7e72bbc commit e082106
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ function getFileTypeFromMimeType(mimeType) {
ext: 'docx',
mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
};
case 'application/vnd.openxmlformats-officedocument.presentationml.template':
return {
ext: 'potx',
mime: 'application/vnd.openxmlformats-officedocument.presentationml.template',
};
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
return {
ext: 'pptx',
Expand Down
Binary file added fixture/fixture.potx
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@
"vtt",
"apk",
"drc",
"lz4"
"lz4",
"potx"
],
"dependencies": {
"@tokenizer/inflate": "^0.2.6",
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ abortController.abort(); // Abort file-type reading from the Blob stream.
- [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format) - Portable Document Format
- [`pgp`](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) - Pretty Good Privacy
- [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics) - Portable Network Graphics
- [`potx`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Powerpoint template
- [`pptx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Powerpoint document
- [`ps`](https://en.wikipedia.org/wiki/Postscript) - Postscript
- [`psd`](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format) - Adobe Photoshop document
Expand Down
2 changes: 2 additions & 0 deletions supported.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export const extensions = [
'apk',
'drc',
'lz4',
'potx',
];

export const mimeTypes = [
Expand Down Expand Up @@ -311,4 +312,5 @@ export const mimeTypes = [
'application/vnd.android.package-archive',
'application/vnd.google.draco', // Invented by us
'application/x-lz4', // Invented by us
'application/vnd.openxmlformats-officedocument.presentationml.template',
];

0 comments on commit e082106

Please sign in to comment.