From 2f5adc294aef2558f967d5709cadc46b7d124657 Mon Sep 17 00:00:00 2001 From: tidezyc Date: Thu, 2 May 2013 23:32:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=AE=9E=E7=8E=B0-=E8=B7=AF=E5=BE=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- src/me/thinkjet/service/upyun/UploadService.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 970c128..5b9f1df 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,4 @@ Desktop.ini *.log *.tmp* classes/ -uploads/ +upload/ diff --git a/src/me/thinkjet/service/upyun/UploadService.java b/src/me/thinkjet/service/upyun/UploadService.java index 348bd86..577d0a0 100644 --- a/src/me/thinkjet/service/upyun/UploadService.java +++ b/src/me/thinkjet/service/upyun/UploadService.java @@ -78,7 +78,7 @@ public static String uploadImgToUpyun(File img) { */ public static String uplaodFileToLocal(File file) { Calendar calender = Calendar.getInstance(); - String filePath = "/uploads/files/" + calender.get(Calendar.YEAR) + "/" + String filePath = "/upload/files/" + calender.get(Calendar.YEAR) + "/" + (calender.get(Calendar.MONTH) + 1); String file_name = new Date().getTime() + RandomStringUtils.randomNumeric(10) @@ -100,7 +100,7 @@ public static String uplaodFileToLocal(File file) { */ public static String uplaodImgToLocal(File img) { Calendar calender = Calendar.getInstance(); - String filePath = "/uploads/imgs/" + calender.get(Calendar.YEAR) + "/" + String filePath = "/upload/imgs/" + calender.get(Calendar.YEAR) + "/" + (calender.get(Calendar.MONTH) + 1); String file_name = new Date().getTime() + RandomStringUtils.randomNumeric(10)