spring-framework / org.springframework.http.codec.multipart

Package org.springframework.http.codec.multipart

Types

FilePart

interface FilePart : Part

Specialization of Part for a file upload.

FormFieldPart

interface FormFieldPart : Part

Specialization of Part for a form field.

MultipartHttpMessageReader

open class MultipartHttpMessageReader : HttpMessageReader<MultiValueMap<String, Part>>

HttpMessageReader for reading "multipart/form-data" requests into a MultiValueMap<String, Part>.

Note that this reader depends on access to an HttpMessageReader<Part> for the actual parsing of multipart content. The purpose of this reader is to collect the parts into a map.

MultipartHttpMessageWriter

open class MultipartHttpMessageWriter : HttpMessageWriter<MultiValueMap<String, *>>

HttpMessageWriter for writing a MultiValueMap<String, ?> as multipart form data, i.e. "multipart/form-data", to the body of a request.

The serialization of individual parts is delegated to other writers. By default only String and Resource parts are supported but you can configure others through a constructor argument.

This writer can be configured with a FormHttpMessageWriter to delegate to. It is the preferred way of supporting both form data and multipart data (as opposed to registering each writer separately) so that when the MediaType is not specified and generics are not present on the target element type, we can inspect the values in the actual map and decide whether to write plain form data (String values only) or otherwise.

SynchronossPartHttpMessageReader

open class SynchronossPartHttpMessageReader : HttpMessageReader<Part>

HttpMessageReader for parsing "multipart/form-data" requests to a stream of Part's using the Synchronoss NIO Multipart library.

This reader can be provided to MultipartHttpMessageReader in order to aggregate all parts into a Map.