Skip to content

detectDjangoUpload

reference
1 min readUpdated

Kind: Function

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

Django / DRF: request.FILES, FileField/ImageField, and the multipart parser classes.

serializerFields carries the view's serializer/form body when one was resolved, so the declared upload fields name themselves. A view that only declares MultiPartParser is still multipart — with no field name to state, it publishes as an any-field body.

Signature

ts
function detectDjangoUpload(view: string, serializerFields): MultipartBody | undefined

Parameters

NameType
viewstring
serializerFieldsany

Returns: MultipartBody | undefined

Was this page helpful?

Download as PDF