diff options
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Utils.java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/Utils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Utils.java b/juick-www/src/main/java/com/juick/www/Utils.java index b860504e..ca3535fd 100644 --- a/juick-www/src/main/java/com/juick/www/Utils.java +++ b/juick-www/src/main/java/com/juick/www/Utils.java @@ -23,6 +23,7 @@ import com.juick.server.TagQueries; import com.mitchellbosecke.pebble.PebbleEngine; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.jdbc.core.JdbcTemplate; @@ -110,7 +111,7 @@ public class Utils { 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("\"", ""); + String filename = cd.substring(cd.indexOf('=') + 1).trim().replace("\"", StringUtils.EMPTY); return filename.substring(filename.lastIndexOf('/') + 1).substring(filename.lastIndexOf('\\') + 1); // MSIE fix. } } |