Commit e734d684 authored by Sysmain's avatar Sysmain

fixed NPE about extension-getting when it's upper

parent c9ccefe5
......@@ -14,7 +14,7 @@ import java.util.regex.Pattern;
public class StringUtils {
public static String getMimeType(String path) {
String extension = path.substring(path.lastIndexOf('.')+1);
String extension = path.substring(path.lastIndexOf('.')+1).toLowerCase();
return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment