Switch To File-Type For Detecting file type
Resolves #8 (closed)
mmmagic
is currently being used for detecting MIME types, but it doesn't work with Node.JS 20(there's a PR to fix it in their repo, but no updates to the package in the last 5 years makes me think it won't be fixed anytime soon). To fix this, using file-type
to detect the MIME type was done.
Due to ESM incompatibilities(https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) we can't use the latest version of file-type
but might be possible with Node 22?
Edited by Rishi Panthee