接口 MultipartRequest
public interface MultipartRequest
This interface defines the multipart request access operations that are exposed
for actual multipart requests.
- 从以下版本开始:
- 4.0 2022/3/17 17:26
- 作者:
- Juergen Hoeller, Arjen Poutsma, Harry Yang
-
方法概要
修饰符和类型方法说明voidcleanup()Cleanup any resources used for the multipart handling, like a storage for the uploaded files.Return the contents plus description of an uploaded file in this request, ornullif it does not exist.Return aMapof the multipart files contained in this request.Return anIteratorof String objects containing the parameter names of the multipart files contained in this request.Return the contents plus description of uploaded files in this request, or an empty list if it does not exist.getMultipartContentType(String paramOrFileName) Determine the content type of the specified request part.cn.taketoday.util.MultiValueMap<String,MultipartFile> Return aMultiValueMapof the multipart files contained in this request.getMultipartHeaders(String paramOrFileName) Return the headers for the specified part of the multipart request.Get the parts of a multipart request, provided the Content-Type is"multipart/form-data", or an exception otherwise.multipartData(String name) Return the contents in this request, or an empty list if it does not exist.
-
方法详细资料
-
getFileNames
Return anIteratorof 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.- 返回:
- the names of the files
-
getFile
Return the contents plus description of an uploaded file in this request, ornullif it does not exist.- 参数:
name- a String specifying the parameter name of the multipart file- 返回:
- the uploaded content in the form of a
MultipartFileobject
-
getFiles
Return the contents plus description of uploaded files in this request, or an empty list if it does not exist.- 参数:
name- a String specifying the parameter name of the multipart file- 返回:
- the uploaded content in the form of a
MultipartFilelist
-
multipartData
Return the contents in this request, or an empty list if it does not exist.- 参数:
name- a String specifying the parameter name of the multipart
-
getFileMap
Map<String,MultipartFile> getFileMap()Return aMapof the multipart files contained in this request.- 返回:
- a map containing the parameter names as keys, and the
MultipartFileobjects as values
-
getMultipartFiles
cn.taketoday.util.MultiValueMap<String,MultipartFile> getMultipartFiles()Return aMultiValueMapof the multipart files contained in this request.- 返回:
- a map containing the parameter names as keys, and a list of
MultipartFileobjects as values
-
multipartData
Get the parts of a multipart request, provided the Content-Type is"multipart/form-data", or an exception otherwise.- 返回:
- the multipart data, mapping from name to part(s)
- 抛出:
IOException- if an I/O error occurred during the retrievalNotMultipartRequestException- if this request is not of type"multipart/form-data"- 另请参阅:
-
getMultipartContentType
Determine the content type of the specified request part.- 参数:
paramOrFileName- the name of the part- 返回:
- the associated content type, or
nullif not defined
-
getMultipartHeaders
Return the headers for the specified part of the multipart request.If the underlying implementation supports access to part headers, then all headers are returned. Otherwise, e.g. for a file upload, the returned headers may expose a 'Content-Type' if available.
-
cleanup
void cleanup()Cleanup any resources used for the multipart handling, like a storage for the uploaded files.
-