UNPKG

680 BTypeScriptView Raw
1/// <reference path="../adonis-typings/bodyparser.d.ts" />
2/// <reference types="node" />
3/**
4 * We can detect file types for these files using the magic
5 * number
6 */
7export declare const supportMagicFileTypes: Set<import("file-type/core").FileExtension>;
8/**
9 * Returns the file `type`, `subtype` and `extension`.
10 */
11export declare function getFileType(fileContents: Buffer): Promise<null | {
12 ext: string;
13 type?: string;
14 subtype?: string;
15}>;
16/**
17 * Computes file name from the file type
18 */
19export declare function computeFileTypeFromName(clientName: string, headers: {
20 [key: string]: string;
21}): {
22 ext: string;
23 type?: string;
24 subtype?: string;
25};