polishing
This commit is contained in:
parent
ce4e3784d1
commit
6fe0e36fe0
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
package org.springframework.web.multipart;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.util.MultiValueMap;
|
||||
|
||||
|
|
@ -56,6 +56,7 @@ public interface MultipartRequest {
|
|||
* or an empty list if it does not exist.
|
||||
* @param name a String specifying the parameter name of the multipart file
|
||||
* @return the uploaded content in the form of a {@link MultipartFile} list
|
||||
* @since 3.0
|
||||
*/
|
||||
List<MultipartFile> getFiles(String name);
|
||||
|
||||
|
|
@ -72,8 +73,8 @@ public interface MultipartRequest {
|
|||
* @return a map containing the parameter names as keys, and a list of
|
||||
* {@link MultipartFile} objects as values
|
||||
* @see MultipartFile
|
||||
* @since 3.0
|
||||
*/
|
||||
MultiValueMap<String, MultipartFile> getMultiFileMap();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -39,7 +39,7 @@ import org.springframework.web.util.WebUtils;
|
|||
|
||||
/**
|
||||
* Base class for multipart resolvers that use Jakarta Commons FileUpload
|
||||
* 1.1 or higher.
|
||||
* 1.2 or above.
|
||||
*
|
||||
* <p>Provides common configuration properties and parsing functionality
|
||||
* for multipart requests, using a Map of Spring CommonsMultipartFile instances
|
||||
|
|
@ -220,7 +220,7 @@ public abstract class CommonsFileUploadSupport {
|
|||
// Extract multipart files and multipart parameters.
|
||||
for (FileItem fileItem : fileItems) {
|
||||
if (fileItem.isFormField()) {
|
||||
String value = null;
|
||||
String value;
|
||||
if (encoding != null) {
|
||||
try {
|
||||
value = fileItem.getString(encoding);
|
||||
|
|
|
|||
Loading…
Reference in New Issue