aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com')
-rw-r--r--juick-api/src/main/java/com/juick/api/util/HttpUtils.java12
1 files changed, 1 insertions, 11 deletions
diff --git a/juick-api/src/main/java/com/juick/api/util/HttpUtils.java b/juick-api/src/main/java/com/juick/api/util/HttpUtils.java
index 2fe4322d3..2f8ca7c54 100644
--- a/juick-api/src/main/java/com/juick/api/util/HttpUtils.java
+++ b/juick-api/src/main/java/com/juick/api/util/HttpUtils.java
@@ -21,8 +21,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.multipart.MultipartFile;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.Part;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -38,15 +36,7 @@ import java.util.UUID;
*/
public class HttpUtils {
private static final Logger logger = LoggerFactory.getLogger(HttpUtils.class);
- public static String getPartFilename(Part part) {
- for (String cd : part.getHeader("content-disposition").split(";")) {
- if (cd.trim().startsWith("filename")) {
- String filename = cd.substring(cd.indexOf('=') + 1).trim().replace("\"", "");
- return filename.substring(filename.lastIndexOf('/') + 1).substring(filename.lastIndexOf('\\') + 1); // MSIE fix.
- }
- }
- return null;
- }
+
public static String receiveMultiPartFile(MultipartFile attach, String tmpDir) {
if (!attach.isEmpty()) {
String partname = attach.getOriginalFilename();