sindresorhus / file-type

Detect the file type of a file, stream, or data
MIT License
3.64k stars 345 forks source link

FileType returns undefined applications/octet-stream pdf file #622

Open Datodia opened 7 months ago

sindresorhus commented 7 months ago

You will need to share a file that reproduces the issue (preferably as small as possible).

Datodia commented 7 months ago

const fileTypeReader = await import('file-type') const fileInfo = await fileTypeReader.fileTypeFromBuffer(content)

content is buffer

console.log(fileInfo.mime) //expected application/octet-stream //actual is undefined

theabhinavdas commented 3 months ago

@sindresorhus came across this issue today, happens with this file: 1000503577.pdf