From 186016ac2e03c10497e30c9a651dc9757108b489 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sun, 18 May 2014 14:20:12 +0700 Subject: Utils receiveMultipart file extension toLowerCase --- src/java/com/juick/http/www/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/java/com/juick/http/www/Utils.java b/src/java/com/juick/http/www/Utils.java index 2ba12f5e..271252c7 100644 --- a/src/java/com/juick/http/www/Utils.java +++ b/src/java/com/juick/http/www/Utils.java @@ -60,7 +60,7 @@ public class Utils { Part filePart = request.getPart("attach"); if (filePart != null) { String partname = Utils.getPartFilename(filePart); - String attachmentType = partname.substring(partname.length() - 3); + String attachmentType = partname.substring(partname.length() - 3).toLowerCase(); if (attachmentType.equals("jpg") || attachmentType.equals("peg") || attachmentType.equals("png")) { if (attachmentType.equals("peg")) { attachmentType = "jpg"; -- cgit v1.2.3