aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-11-06 17:14:04 +0300
committerGravatar Vitaly Takmazov2015-11-06 17:14:04 +0300
commitfeb498a86f281d82f1d2d1579943079d954baa6e (patch)
tree4696d4bfec2b043da9b1b01e1255329a356f0dd1 /src/main/java/com/juick
parentc6e5f4092997365a36b2acd8d2c445714e36c6a1 (diff)
fix posting without img
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/http/www/NewMessage.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/http/www/NewMessage.java b/src/main/java/com/juick/http/www/NewMessage.java
index d6ef22ee..4d31ee14 100644
--- a/src/main/java/com/juick/http/www/NewMessage.java
+++ b/src/main/java/com/juick/http/www/NewMessage.java
@@ -170,7 +170,7 @@ public class NewMessage {
}
String paramImg = request.getParameter("img");
- if (attachmentFName == null && paramImg != null) {
+ if (attachmentFName == null && paramImg != null && paramImg.length() > 10 ) {
try {
URL imgUrl = new URL(paramImg);
attachmentFName = Utils.downloadImage(imgUrl);
@@ -328,7 +328,7 @@ public class NewMessage {
}
String paramImg = request.getParameter("img");
- if (attachmentFName == null && paramImg != null) {
+ if (attachmentFName == null && paramImg != null && paramImg.length() > 10) {
try {
attachmentFName = Utils.downloadImage(new URL(paramImg));
} catch (Exception e) {