guess-mime
v0.0.2
Published
Guess image file mime form binary string
Downloads
3
Readme
Guess MIME from Binary String.
A Library to determine mime type from binary string.
import guessMIME from 'guess-mime';
const base64 = '...'; // just base64 code of image, without mime segment
const binaryString = window.atob(base64);
const mime = guessMIME(binaryString); // return null if guess failed