Skip to content

detectMulterUpload

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/multipart.ts

Express/multer: upload.single('avatar') in a route's middleware position.

Pass ONLY the middleware argument slices — a whole route call would drag an inline handler body in with it, where an unrelated .any( or .array( would read as an upload.

Signature

ts
function detectMulterUpload(middleware: string): MultipartBody | undefined

Parameters

NameType
middlewarestring

Returns: MultipartBody | undefined

Was this page helpful?

Download as PDF