file-type
file-type copied to clipboard
FileType returns undefined applications/octet-stream pdf file
trafficstars
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