Skip to content

Commit

Permalink
修改文件上传实现-路径修改
Browse files Browse the repository at this point in the history
  • Loading branch information
tidezyc committed May 2, 2013
1 parent bf4acbb commit 2f5adc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Desktop.ini
*.log
*.tmp*
classes/
uploads/
upload/
4 changes: 2 additions & 2 deletions src/me/thinkjet/service/upyun/UploadService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 2f5adc2

Please sign in to comment.