Top Description Methods
org.springframework.web.multipart

public Interface MultipartRequest

Known Direct Subinterfaces
org.springframework.web.multipart.MultipartHttpServletRequest
Imports
java.util.Iterator, .List, .Map, org.springframework.lang.Nullable, org.springframework.util.MultiValueMap

This interface defines the multipart request access operations that are exposed for actual multipart requests. It is extended by MultipartHttpServletRequest.
Authors
Juergen Hoeller, Arjen Poutsma
Since
2.5.2

Method Summary

Modifier and TypeMethod and Description
public MultipartFile

Returns:

the uploaded content in the form of a MultipartFile object
getFile
(String
a String specifying the parameter name of the multipart file
name
)

Return the contents plus description of an uploaded file in this request, or null if it does not exist.

public Map<String, MultipartFile>

Returns:

a map containing the parameter names as keys, and the MultipartFile objects as values
getFileMap
()

Return a java.util.Map of the multipart files contained in this request.

public Iterator<String>

Returns:

the names of the files
getFileNames
()

Return an java.util.Iterator of String objects containing the parameter names of the multipart files contained in this request.

public List<MultipartFile>

Returns:

the uploaded content in the form of a MultipartFile list
getFiles
(String
a String specifying the parameter name of the multipart file
name
)

Return the contents plus description of uploaded files in this request, or an empty list if it does not exist.

public MultiValueMap<String, MultipartFile>

Returns:

a map containing the parameter names as keys, and a list of MultipartFile objects as values
getMultiFileMap
()

Return a MultiValueMap of the multipart files contained in this request.

public String

Returns:

the associated content type, or null if not defined
getMultipartContentType
(String
the name of the part
paramOrFileName
)

Determine the content type of the specified request part.

Method Detail

getFileback to summary
public MultipartFile getFile(String name)

Return the contents plus description of an uploaded file in this request, or null if it does not exist.

Parameters
name:String

a String specifying the parameter name of the multipart file

Returns:MultipartFile

the uploaded content in the form of a MultipartFile object

Annotations
@Nullable
getFileMapback to summary
public Map<String, MultipartFile> getFileMap()

Return a java.util.Map of the multipart files contained in this request.

Returns:Map<String, MultipartFile>

a map containing the parameter names as keys, and the MultipartFile objects as values

getFileNamesback to summary
public Iterator<String> getFileNames()

Return an java.util.Iterator of String objects containing the parameter names of the multipart files contained in this request. These are the field names of the form (like with normal parameters), not the original file names.

Returns:Iterator<String>

the names of the files

getFilesback to summary
public List<MultipartFile> getFiles(String name)

Return the contents plus description of uploaded files in this request, or an empty list if it does not exist.

Parameters
name:String

a String specifying the parameter name of the multipart file

Returns:List<MultipartFile>

the uploaded content in the form of a MultipartFile list

Since
3.0
getMultiFileMapback to summary
public MultiValueMap<String, MultipartFile> getMultiFileMap()

Return a MultiValueMap of the multipart files contained in this request.

Returns:MultiValueMap<String, MultipartFile>

a map containing the parameter names as keys, and a list of MultipartFile objects as values

Since
3.0
getMultipartContentTypeback to summary
public String getMultipartContentType(String paramOrFileName)

Determine the content type of the specified request part.

Parameters
paramOrFileName:String

the name of the part

Returns:String

the associated content type, or null if not defined

Annotations
@Nullable
Since
3.1