diff --git a/common/global.d.ts b/common/global.d.ts index 047b91f..543d8e7 100644 --- a/common/global.d.ts +++ b/common/global.d.ts @@ -1,3 +1,4 @@ +import { BusBoyFile } from 'ass'; import { Request, Response } from 'express'; declare global { @@ -14,6 +15,8 @@ declare global { */ host: string } + + files: { [key: string]: BusBoyFile } } } } diff --git a/common/types.d.ts b/common/types.d.ts index c253cb4..46b3cc3 100644 --- a/common/types.d.ts +++ b/common/types.d.ts @@ -28,6 +28,31 @@ declare module 'ass' { gfySize: (val: any) => boolean; maximumFileSize: (val: any) => boolean; } + + interface BusBoyFile { + uuid: string; + field: string; + file: string; + filename: string; + encoding: string; + mimetype: string; + truncated: boolean; + done: boolean; + } + + interface AssFile { + fakeid: string; + id: NID; + mimetype: string; + filename: string; + save: { + local?: string; + s3?: any; + } + sha256: string; + timestamp: string; + uploader: NID; + } } //#region Dummy modules