Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/docxml/src/utilities/mime-types.ts>getMimeTypeForUint8Array

TypeScript library for parsing and building a DOCXML file
Go to Latest
function getMimeTypeForUint8Array
import { getMimeTypeForUint8Array } from "https://deno.land/x/docxml@5.2.0/src/utilities/mime-types.ts";

Guess the mime type associated with a byte stream by looking at the first few signature bytes.

Throws when the mime type is not recognized, or when it is not JPEG/GIF/PNG.

Parameters

uint: Uint8Array