跳到主要内容
版本:Next

UploadMiddleware

Implements

  • IMiddleware<any, any>

Index

Constructors

constructor

Properties

ignore

ignore: IgnoreMatcher<any>[]

logger

logger: ILogger

match

match: IgnoreMatcher<any>[]

uploadConfig

uploadConfig: UploadOptions

Methods

checkAndGetExt

  • checkAndGetExt(filename: any, whiteListMap?: Map<string, string>): string | boolean

checkFileType

  • checkFileType(ext: string, data: Buffer, uploadFileMimeTypeMap?: Map<string, string[]>): Promise<{ current?: string; mime?: string; passed: boolean }>

execUpload

  • execUpload(ctx: any, req: any, res: any, next: any, isExpress: any): Promise<any>

getUploadBoundary

  • getUploadBoundary(request: any): string | false

init

  • init(): Promise<void>

isReadableStream

  • isReadableStream(req: any, isExpress: any): boolean

resolve

  • resolve(app: any): (req: any, res: any, next: any) => Promise<any>

staticgetName

  • getName(): string