Skip to main content
Version: 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 }>

getUploadBoundary

  • getUploadBoundary(request: any): string | false

isReadableStream

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

resolve

  • resolve(app: IMidwayBaseApplication<Context>, options?: { mode?: UploadMode } & BusboyConfig): (ctxOrReq: any, resOrNext: any, next: any) => Promise<any>

staticgetName

  • getName(): string