Description Common file types from the macOS-native Pages, Numbers and Keynote apps. Similar to Microsoft Office documents, these are zip files and can be detected by the file, which contains snappy-compressed protobuf messages. Keynote files can also be recognized by the contained and files, while for Pages and Numbers files probably the file has to be decompressed and parsed. Currently I have no time for this, for anyone else wanting to tackle this, here is some more information: I found this tool quite helpful https://sheetjs.com/tools/iwa-inspector/, its source code for decoding .iwa files can be found here. Also, this description of IWA files (especially "Determining File Type" at the bottom), as well as this one. Lastly, the Apache Tika toolkit also uses this method to detect iWork files (source), however they also have not implemented proper support for numbers and pages files yet: https://issues.apache.org/jira/browse/TIKA-4464 Existing Issue Check [x] I have searched the existing issues and could not find any related to my problem. File-Type Scope Acknowledgment [x] I understand that file-type detects binary file types and not text or other formats.
Description I saw that this was already an issue in 2020. But since version 21.1.0 I am seeing the behavior explained underneath. Version 21.0.0 still had the expected behavior. Current behavior docx, pptx, xlsx files saved with microsoft word are correctly detected as: application/vnd.openxmlformats-officedocument.wordprocessingml.document application/vnd.openxmlformats-officedocument.presentationml.presentation application/vnd.openxmlformats-officedocument.spreadsheetml.sheet docx, pptx, xlsx files saved with libre office are detected as application/zip. Expected behavior docx, pptx, xlsx files saved with libre office are detected as: application/vnd.openxmlformats-officedocument.wordprocessingml.document application/vnd.openxmlformats, officedocument.presentationml.presentation application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Existing Issue Check [x] I have searched the existing issues and could not find any related to my problem. ESM (ECMAScript Module) Requirement Acknowledgment [x] My project is an ESM project and my contains the following entry: . File-Type Scope Acknowledgment [x] I understand that file-type detects binary file types and not text or other formats.
Repository: sindresorhus/file-type. Description: Detect the file type of a file, stream, or data Stars: 4305, Forks: 395. Primary language: JavaScript. Languages: JavaScript (93.3%), PostScript (6%), TypeScript (0.6%), Rich Text Format (0.1%). License: MIT. Topics: buffer, detect, file, file-types, javascript, magic, magic-numbers, nodejs, uint8array. Latest release: v22.0.1 (2mo ago). Open PRs: 0, open issues: 0. Last activity: 2mo ago. Top contributors: sindresorhus, Borewit, kevva, mifi, karlhiramoto, sly7-7, stroncium, mceachen, junmer, Richienb and others.