浏览代码

修改图片路径

xusonglin 5 年之前
父节点
当前提交
701c30680e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/java/com/jkcredit/sysnews/service/photo/PhotoServiceImpl.java

+ 1 - 1
src/main/java/com/jkcredit/sysnews/service/photo/PhotoServiceImpl.java

@@ -100,7 +100,7 @@ public class PhotoServiceImpl extends BaseService implements PhotoService {
         int month = cal.get(Calendar.MONTH) + 1;
         int year = cal.get(Calendar.YEAR);
         String directoryName = year+"-"+month;
-        String filePath = uploadPath +directoryName + File.separator + fileName;
+        String filePath = uploadPath + File.separator + directoryName + File.separator + fileName;
 
         try {
             UploadUtil.upload(photoDto.getPhoto(), filePath);