sindresorhus/
Detect the file type of a Buffer/Uint8Array
USD raised
Recent activities
Many MP4 variants are not implemented
Support for AC3 and VOC
m4b audio books maps to video/mp4
Question: how to detect if a file is an "alias" or a "shortcut" of a file ?
Support for Adobe Illustrator file ai
False-positives for the `msi` detection
UTF-16LE encoded text files are identified as mp3
Pre-POSIX.1-1988 (i.e. v7) tar header
Tests do not cover mime-type
isSupported() method
Not recognising `application/pdf` file types
100% cpu with 177.3 MiB zip
'SCRIPT1010: Expected identifier' on IE11
Not working in IE
Add tests to ensure all the data is in sync
SyntaxError: Unexpected token ...
Add tests for `.asf`, `.ogm`, `.ogx`, and `.mpc` file types
Check archive types before any other type
Can't compile build because of spread operator
fileType undefined when using stream
Add Esri Shapefile support?
Improve the MPEG/ADTS frame / ID3 detection algorithm
Change proposal: break the fixed sample limit
ARW files report as TIF
MOV Fixture CVE-2009-1539
Support for tracked/module file formats
Failes to detect MP4 (.m4b) audiobook
Possible flaw in .pptx detection
.aac is detected as .mp4 (audio/mpeg)
xo breaks Windows compatibility in development
add .csv type support
Detect audio files with an ID3 header, which are not MP3
TypeError: Expected the `input` argument to be of type `Uint8Array` or `Buffer` or `ArrayBuffer`, got `object`
Ability to detect audio WebM
Ability to detect .mka (Matroska audio)
Pixelation on specific channels
Update tokenizer example in README to @tokenizer/http v0.5.0
ASF/.asf detection is missing / broken
`import fileType from "file-type/browser"` can not be used in in 13.0.0
why not to support doc, xls, ppt?
.sub file is detected as video/mpeg
Cant't resolve fs after updating to 13.0.3 version
inconsistent behavior for small size buffer
FileType.fromBuffer() returns undefined instead of a promise
Docx files being detected as a zip
End-Of-Stream error thrown parsing docx
index.js in published package only has fromFile
PNG with long iTXt chunk not detected as PNG image
minimumBytes was not properly deprecated, breaking change
stream.unshift() after end event
TypeScript definition error
Please check csv
Support PGP
Word files (.docx) identified as application/zip
Extending file-type
Very small file (11 byte)
stream does not work with simple got stream snippet
m4a from android phone recognizes as 'video/mp4', but should 'audio/x-m4a'
Is mp4 really an image/mp4 mime type not something like audio/mp4 or video/mp4?
Returns End-Of-Stream Error while Uploading .zip file
Expected identifier, string or number in the Edge browser
Excel (.xls) files detected as application/x-msi
Please add this xls-test
Possible to use file-type as a transform stream in a pipeline()?
Tar detection seems broken
Browser compatibility questions
Returns undefined for ICNS files
Can't make it work in a browser
PDF created with Adobe Illustrator are wrongly detected as .ai files
Possible bug: Stream gets mangled after passing through FileType.fromStream
return undefined for file.py or file.php
FileType.fromBlob and fs.stat() is not a function
text/html
Mime type not being detected using fromStream, despite buffer matching the magic number
docx
Mime type : text/csv is not supported by fileType.fromBuffer() method
Not running in browser (uses node's Buffer)
Doesn't work with Node v13.3.0?
Add `asar` support
.txt detection broken.
Document expected return values of unsupported file types
fromTokenizer error: Offset hasn't been loaded yet.
make minimumBytes = 4100 public
more format need to be added
False positives test are broken
FileType.{extensions,mimeTypes} is undefined in browser build
Corrupt PNG file (invalid chunk length) causes read error
it is saying undefined for .txt type is it the same case as .csv?
file type of .xlsx is coming as application/x-msi
One doubt, the file types .txt, .csv are returned as undefined. Can we consider as which all files like csv txt which are having plain text no magic number or header to find MIME type for those the result would be undefined?
Add .stl file type support?
Facing issue while validating a .txt/.js file in ubuntu
file-type throws an "unexpected error" in Internet Explorer
Add .txt file type support
Asar support breaks on asar archives where JSON header size >= 240
Why '.svg' is not typeof '' instead of 'application/xml'
ERROR in ./node_modules/readable-web-to-node-stream/lib/index.js Module not found
Question: User file-type check on frontend
Why is detecting file type from buffer async?
Getting undefined file type for buffer
*.docm was detected was *.docx
Module not found: Error: Can't resolve 'fs' in '..../node_modules/strtok3/lib'
How to use it with Browser
Error while building with webpack
No file type retrieved when reading from Buffer
Failing to compile in typescript project
Uncaught SyntaxError: Unexpected token ...
Support for Estonian digital-signed documents
Support Microsoft Compiled HTML Help
Don't support elf file?
fromBuffer and stream methods give different results for same ai file
Support Personal Storage Table file
Support Windows Event Viewer file
Application is not loading in IE after installing file-type
Support JSON
Read blob in nodejs
Edge Legacy (44): Expected identifier, string or number
Support DWG File
Block Stream Pipe
Issue Detecting PNG
Zip File Type Determination Slow When Using fromTokenizer Method
MPEG sync check at odd offset required?
vcard are considered as a ics calendar
Can file-type recognize text/xml mime type?
possibly support xcf?
unshift stream support
missing main field in package.json
Support htmlFile
Use new blob read methods
TypeError: stream.getReader is not a function
Asking for subcategory of MS-CFB
EOT not detected
`stream()` may throw End-Of-Stream error
Updated dependency strtok3 v6.2 will break file-type
`stream()` does not like the stream from module `got`
Code examples provided in typing definition files have syntax errors
v16.5 patch release with unlocked dependency versions `strtok3` & `token-types`
Detect via JS native in browser
Support for text based file formats
DNG is falsely detected as TIFF
React Native Error
Docs are off with what users get from NPM
Type detection failing for webm format file
Type detection fails for JPG file
audio/webm detected as video/webm
XML Filetype parsing fails with bom character
Keep CommonJS API function names
Undefined fileTypeFromBlob in browser?
FileType.fromFile htm/html file returns undefined ďź
Readme is not updated.
README is faulty
SyntaxError: Cannot use import statement outside a module
node: prefix error using in browser
TypeSCript error "Must use import to load ES Module"
How do I bundle file-type for web browsers?
file-type does not work in browsers
Detect SOF55 marker to distinguish JPEG-LS from baseline JPEG
"Concurrent read operation" error thrown reading from stream
Enforce alphabetical order for supported file types list
Require of ES Module not supported
token-types dependency update
fileTypeFromBlob is not exported from index.js
NextJs Support
Makes my hero run out of memory while running
Your repository makes the computer slow
I can't load through commonjs in Node
PDF is not detected correctly if it starts with a UTF-8 BOM byte sequence
PDF Files cause `fromStream` to never finish
node 12 fresh install unexpected token
Babel transpilation error
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module
Issue with checking epub mimetype
Error when trying to import/use in svelte/rollup project.
Cannot find module 'strtok3/core'
How to check mime type of url without downloading the file?
Unable to get file-type to run in browser (modules strtok3/core and token-types not found)
Either make this package browser capable or declare it pure node
.doc file detected as application/x-cfb
Problem with upload file / triggerUncaughtException
Is there any good ideas to detect html,svg,txt,js,css?
Cannot find module 'strtok3/core' from 'node_modules/file-type/core.js'
Cannot find module 'node:stream' or its corresponding type declarations
The v16.5.4 tag is the same as v17.1.2
Would it be better to return the file extension with a period?
CommonJS and ESM - support both
Please add JSON support
Facing an import error with webpack build
image/apng is not an actual MIME type
TIF files return an End-Of-Stream error
`fixture.mp4` seems to be a `m4v`?
Babel loader
cannot use fileTypeFromBlob in next.js
Jest error while trying to use with the file-type module. How can I fix "Cannot use import statement outside a module"?
.aac audio file incorrectly detected as video/mp4
Dependencies are not found
Support Apache Parquet files
Cannot import the module
Consider alternate (browser friendly) buffer
End of stream error when checking the file type of a pdf
strapi plugin - require() of ES Module not supported
Next.js, Typescript seems not work with conditional exports
Doesn't support and text files
Drop `browser` export
Make `Blob` lazy
Cloudflare Workers support
audio/mpeg detected as video/webm or video/mp4
Unable to use plugin: Error [ERR_REQUIRE_ESM]: require() of ES Module
jest: Cannot use import statement outside a module
Request support for FBX (Filmbox) detection
JPEG files with the ".jpeg" extension are grouped under the ".jpg" category
build fix
fileTypeFromBase64
[ERR_REQUIRE_ESM] Error using webpack or babel
Got this build error: Could not resolve "node:buffer"
When I download `file-type` into the webpack 3 project, running the error message requires installation `strtok3`
Support reading from browser streams in server-side export
Filetype return undefined with .npy file
Uncaught SyntaxError: The requested module does not provide an export named 'fileTypeFromBlob' in browser
mimetype of certain PNGs mislabeled as "text/plan"
`SyntaxError: Cannot use import statement outside a module` When running in Jest
The requested module '/node_modules/.vite/deps/file-type.js?v=74b3d8f6' does not provide an export named 'fileTypeFromBlob'
CommonJS / Hybrid Package
Hang
Why does file-type's `fileTypeFromBuffer` return different outputs for SVG files?
blob.arrayBuffer is not a function
Add support for ES module "require" syntax
Add detecting Web Stream support
19.1.0 does not export `fileTypeFromTokenizer`
TypeError when upgrading from 19.0.0 to 19.1.0: "ReadableStreamBYOBReader needs a ReadableByteStreamController"
fileTypeFromFile are not defined in browser.d.ts
Automate generation of the release notes
Cannot find name 'ReadableStream' when compiling project with file-type dependency
fileTypeStream broken import
Can't access node functions when tsconfig moduleResolution is set to "bundler"
Maybe file-type should mention the runtime require full icu-data
No "exports" main defined
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined
Support for WebVTT files (text/vtt)
file-type ERR_PACKAGE_PATH_NOT_EXPORTED typescript
Incorrect MIME type for Opus files.
Changes on typing break with `stream.Readable`
Chromium consistently crash after processing ~990 files (of several specific types) with `fileTypeFromBlob` - a.readFromStream WebStreamReader.js - TypeError: network error
`fileTypeFromStream` throws an error in combination with strtok3@9.0.1
fileTypeFromBlob throws an exception on Mac
Š 2019 BoostIO, Inc.