Skip to content

Switch To File-Type For Detecting file type

Rishi Panthee requested to merge rishi556/Switch-to-file-type into master

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( we can't use the latest version of file-type but might be possible with Node 22?

Edited by Rishi Panthee

Merge request reports