Closed xanhz closed 7 months ago
.npy file has application/octet-stream mimetype but actually it returns undefined
const { fromFile } = require('file-type'); fromFile('foo.npy').then((filetype) => console.log(filetype?.mime)) // expect application/octet-stream
I have same problem, how to solve it?
I have same problem, how to solve it? Because .npy files do not have header to use magic number. So to fix this problem I use mime-types to get from file path.
.npy file has application/octet-stream mimetype but actually it returns undefined