sindresorhus/file-type

FileType returns undefined on pdf file

Datodia opened this issue · 4 comments

FileType returns undefined on pdf file

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

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

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