file-type icon indicating copy to clipboard operation
file-type copied to clipboard

FileType returns undefined applications/octet-stream pdf file

Open Datodia opened this issue 1 year ago • 3 comments
trafficstars

Datodia avatar Jan 17 '24 07:01 Datodia

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

sindresorhus avatar Jan 17 '24 07:01 sindresorhus

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

Datodia avatar Jan 17 '24 07:01 Datodia

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

theabhinavdas avatar May 27 '24 15:05 theabhinavdas