diff options
author | Vitaly Takmazov | 2016-12-08 16:14:34 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-08 16:59:04 +0300 |
commit | 34f9a7dad5535870486edb304ee8043381f7cbdd (patch) | |
tree | 1c5d903f92d7383d2a6700947e64d976a68c0cd1 /juick-api/src/main/java/com/juick/api/util | |
parent | 7e954500ee1b68ad07e2b0bda4eb549ee99167b4 (diff) |
juick-api: fix upload
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/util')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/util/HttpUtils.java | 2 |
1 files changed, 1 insertions, 1 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 2f8ca7c5..93fb7874 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 @@ -38,7 +38,7 @@ public class HttpUtils { private static final Logger logger = LoggerFactory.getLogger(HttpUtils.class); public static String receiveMultiPartFile(MultipartFile attach, String tmpDir) { - if (!attach.isEmpty()) { + if (attach !=null && !attach.isEmpty()) { String partname = attach.getOriginalFilename(); if (partname != null && partname.length() > 0) { String attachmentType = partname.substring(partname.length() - 3).toLowerCase(); |